Same as the UILabel class:
class UILabel : UIView, NSCoding { var text: String! // default is nil var font: UIFont! // default is nil (system font 17 plain) var textColor: UIColor! // default is nil (text draws black) var shadowColor: UIColor! // default is nil (no shadow) var shadowOffset: CGSize // default is CGSizeMake(0, -1) -- a top shadow .... }
But if I define a class like this that also did not have an init function. The compiler will warn me. How can I do the same as Apple to hide the implementation, only declare the interface. Thanks.
source share