Which initializer(s) to override for UITableViewController subclass

后端 未结 5 1070
滥情空心
滥情空心 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:42

    An addition to the posts above that reference –initWithCoder:

    If you added added the view controller to its parent via interface builder (for example: if the view controller is connected to a tab bar controller in interface builder), then you need to override –initWithCoder.

    (-initWithNibName will only be called when you create the view controller programmatically.)

提交回复
热议问题