Use-case:
Problem:
I was expecting that 'MyCustomView::initWithFrame' will get called, apparently, it doesn't!!
How can I make custom classes instantiated while the 'XiB' is being loaded ?
Any help will be appreciated.
你应该覆盖initWithCoder:
用于初始化和awakeFromNib
用于当视图连接所有出口和操作时。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.