iPhone app to iPad app
I had created an iPhone app long time back. Now I want to kind of convert the same into an iPad app (the code would more or less remain the same...I only want to redesign the xib for iPad size)
Now I am using XCode 4 and after opening the app, I changed the devices to iPad. But my .xib are still showing iPhone size. It created an iPad folder (just like Classes/Resources/Products...)
Also to add, the app now opens an iPad simulator, but lets say I have a UIWebView which just stretches to iPhone size (as in IB) and not the complete iPad size...
How and where do I redesign the xib for iPad ? What are the updates to be made when we just change the devices from iPhone to iPad ? Also I guess an iPhone app would work on iPad (using 2x) , but the reverse is not true. Please confirm.
Thank you.
You should look into creating a Universal app which basically has shared code and libraries for the iPhone and iPad but different view layers (views or XIBs).
In that model you have different interfaces for both which you should. The paradigms are different - in iPhone you have small real estate so you have navigators that drill in and pop out. In iPad, you have more real estate so you have master/detail splitter views with pop-over controls. As you pointed out, even the web views are different sizes at a minimum.
If you start fresh you can create a universal app and get a feel for how it's laid out. File, new project, iOS, pick app type, next. For device family select Universal.
If you are converting, there's some resources out there. Here's some:
http://useyourloaf.com/blog/2010/4/7/converting-to-a-universal-app-part-i.html
How to convert iPhone app to universal in xcode4, if I previously converted, but deleted MainWindow-iPad?
Convert simple iPhone app to Universal app
I find it easiest to open the xibs in the separate Interface Builder that came with previous (3.2?) XCode and use its "convert to iPad using autoresize masks" option. Then I include the new separate XIBS in the project and do conditional loading (eg - use the UI_USER_INTERFACE_IDIOM() makro to load one xib or another.)
链接地址: http://www.djcxy.com/p/95736.html上一篇: iPad多任务支持需要这些方向
下一篇: iPhone应用程序到iPad应用程序