I get \"could not load any Objective-C class information. This will significantly reduce the quality of type information available.\" warning in the console while initializi
This seems like you are going the long way round instantiating a view. You have a view of class SystemMessage
which instantiates a nib of name SystemMessage
and then inserts that as a view :/
The simplest way to do this is to set the root view in your Xib to be of type SystemMessage
Then you connect your outlets to the view that you just gave the right type
This means that you can lose have your code and end up with
import UIKit
@IBDesignable
class SystemMessage: UIView {
@IBOutlet weak var lbl_message: UILabel!
static func loadViewFromNib() -> SystemMessage {
return NSBundle(forClass: self).loadNibNamed("SystemMessage", owner: nil, options: nil).first as! SystemMessage
}
}
This just gives you an easy way to instantiate your view from code with SystemMessage.loadViewFromNib()
. File's Owner
is probably being set incorrectly in this instance