2015-10-19 74 views
0

喜林讓我的類定義添加斯威夫特的Objective-C項目編譯錯誤

林讓我的類定義了以下錯誤以下錯誤

預期的「{」類

我的定義模塊=是bridge.h是設置

嵌入內容包含迅速=是

代碼如下

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

附加@objc

@objc class HeaderFooterView : UIView {