iOS通用应用程式问题 [英] iOS Universal App question
问题描述
我已将我的iPad应用提交给苹果并获得批准.现在,我想在应用程序中添加iPhone支持.
I have submitted my iPad app to apple and got approved. Now, i want to add iPhone support to the App.
我的第一个问题是:
Q1.提交后此刻是否可以使该应用通用?
Q1. is it possible to make the app universal at this moment after submission?
如果是,我有第二个问题
If yes, i have question no.2
Q2.我的iPhone应用程序与iPad完全相同,但是由于屏幕尺寸的自定义,因此只有少数视图外观不同.我应该在XCode中做什么来分别指定iPhone/iPad使用哪个类?将它们分为2个项目时,我可以顺利构建它们.
Q2. my iPhone app is exactly the same as the the iPad but only a few views are in different look due to the customization in screen size. What should I do in XCode to specify which class that iPhone/iPad is using respectively? I can build them smoothly when i separated them into 2 projects.
谢谢.
推荐答案
问题1:是的,只需将您的项目转换为通用项目并以相同的ID提交即可.
Q1: Yes, just convert your project to universal and submit it with the same id.
Q2: Fairly easy, conver your project into universal by following the steps here (http://useyourloaf.com/blog/2010/4/7/converting-to-a-universal-app-part-i.html) . The basic idea is to extract your business logic from controllers and use different controller for iPhone and iPad. Don't try to implement it with code block like that
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
// ipad goes here
}
else
{
// other
}
注意: 如果您使用Google搜索,则会发现此链接,不要使用它,它已经过时了-
note: If you google it, you will find this link, don't use it, it is outdated -- http://iphonedevelopment.blogspot.com/2010/04/converting-iphone-apps-to-universal.html
这篇关于iOS通用应用程式问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!