Group outlets in a custom NSObject
suggest changeMove every outlet to an NSObject. Then drag an Object from the library to the controller scene of the storyboard and hook the elements there.
class ContactFormStyle: NSObject
{
@IBOutlet private weak var message: UILabel! {
didSet {
message.font = UIFont.systemFontOfSize(12)
message.textColor = UIColor.blackColor()
}
}
}
class ContactFormVC: UIViewController
{
@IBOutlet private var style: ContactFormStyle!
}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents