您好,我的课程定义上出现以下错误
我的班级定义出现以下错误
预期课程中的'{'
我的定义模块=是bridge.h是设置
嵌入内容包含swift = Yes
代码如下
class HeaderFooterView : UIView {
override init(frame: CGRect){
super.init(frame: frame)
self.autoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight
self.autoresizesSubviews = true
self.backgroundColor = UIColor.clearColor()
}
required init(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
self.autoresizingMask = UIViewAutoresizing.FlexibleWidth | UIViewAutoresizing.FlexibleHeight
self.autoresizesSubviews = true
self.backgroundColor = UIColor.clearColor()
}
}
任何想法?
答案 0 :(得分:0)
在课前添加@objc
@objc class HeaderFooterView : UIView {