Just like 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, which didn't has init function also. The compiler will warning me. How could I do the same thing as Apple does, to hide the implemention, only declare the interface. Thanks.
UILabel is not implemented in Swift.
What you see here is derived from the Objective-C header file for UILabel.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With