Converting an iPhone app to a Universal app?

后端 未结 3 946
孤街浪徒
孤街浪徒 2021-01-14 09:56

I have an iPhone app with FirstViewController and SecondViewController with respective views FirstV

3条回答
  •  醉梦人生
    2021-01-14 10:13

    You would be best of to just create a new ViewController unless you're into masochism. Reusing in that way would most likely be to much trouble, and I'd go with aggregation or inheritance in the case you need to reuse logic in your ViewControllers.

    I typically create a base ViewController, say XYZViewController and then create a XYZViewController_iPhone with all iPhone-specials and a separate XYZViewController_iPad for iPads. But if they're totally different I give them unique names and their own NIBs as well as ViewControllers.

提交回复
热议问题