문제

I've built my own subclass which inherits form UITableView. I've implemented iniWithFrame: to set up some custom properties.

In interface builder I've set up a table view object to be a member of my custom class.

My problem is that iniWithFrame: is not being called and so I can't set up my properties and I'm not sure why it isn't called.

도움이 되었습니까?

해결책

When created from an XIB / storyboard, initWithFrame: will not be called. Instead, the initWithCoder: method will be called because the instance is being unarchived.

In your subclass, you should implement both methods and apply your custom configuration in both cases.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top