Question

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.

Was it helpful?

Solution

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top