When to use a UIView vs. a UIViewController on the iPhone?

前端 未结 9 749
谎友^
谎友^ 2020-12-04 16:25

I have always sort of wondered when to use a UIView vs. a UIViewController on the iPhone.

I understand that you shouldn\'t use a UIViewController unless it\'s a full

9条回答
  •  庸人自扰
    2020-12-04 17:09

    Put everything on a screen into a UIViewController until the view controller starts to have too much code, then break out the screen into multiple UIViewControllers contained by one master view controller...

    To put that into context of your answer, make a view controller for that modal overlay. It will have one anyway if you are using a nav controller to present it (and you probably should).

提交回复
热议问题