Which initializer(s) to override for UITableViewController subclass

后端 未结 5 1087
滥情空心
滥情空心 2020-12-28 18:05

I have a UITableViewController subclass that\'s instantiated, depending on where it\'s used, in a NIB or via code. In both cases I want to do customization in

5条回答
  •  执笔经年
    2020-12-28 18:52

    Implement:

    - (void) viewDidLoad
    

    and do your component initialization there.

    It has the advantage of only doing the initialization when the view is actually requested.

    Or just make a separate setup method invoked by all initializers.

提交回复
热议问题