Pregunta

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.

¿Fue útil?

Solución

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.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top