开发者

Developing app for both iPhone and iPad

How should one proceed if he has to develop the same app on iPhon开发者_高级运维e and iPad? Should all View files be separate with same controller and Model files?


You separate things where you need to. If everything in your iPad views match up with items in your iPhone views, you can (typically) reuse much (if not all) of the view controller.

I have found myself, more often than not, creating a subclass for the common idioms, and then extending that for iphone/ipad based on their differences. It's not a fabulous solution, but it works.


This depends on your app, and the differences between your UI on the iPhone and the iPad.

For some views, I've had success in using the same view and view controller classes, with a few run-time checks for the idiom or window size; but that's because there wasn't much difference in those particular view's UI architecture between iPhone/iPad idioms.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜