我已经向苹果提交了我的iPad应用程序并获得了批准。现在,我想在应用程序中添加 iPhone 支持。
我的问题一是:
Q1。提交后现在可以让应用程序通用吗?
如果是,我有问题 2
Q2。我的 iPhone 应用程序与 iPad 完全相同,但由于屏幕尺寸的定制,只有少数视图的外观有所不同。我应该在 XCode 中做什么来指定 iPhone/iPad 分别使用哪个类?当我将它们分成两个项目时,我可以顺利地构建它们。
谢谢。
I have submitted my iPad app to apple and got approved. Now, i want to add iPhone support to the App.
My question no.1 is:
Q1. is it possible to make the app universal at this moment after submission?
If yes, i have question no.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.
Thank you.
发布评论
评论(4)
您可以修改同一应用程序并添加其他设备的支持。您需要再次重新提交申请。
从代码中,您可以检测它正在执行哪种类型的设备,并基于此您可以为每个视图控制器加载适当的 XiB 文件。
You can modify the same application and add support of other device. you need to resubmit application again.
From with in your code you can detect on which type of device it is executing and based on that you can load appropriate XiB file for each view controller.
是的,这很容易。您必须创建通用应用程序
文件--->新项目-->基于Windows的应用程序
,然后选择产品类型通用您有一个单独的iPhone视图以及< br>
平板电脑
Yes.It's easy. you have to create Universal app
File--->newproject-->Windowsbasedapplication
and then you select Product type Universal You have a separate view for iphone as well as
ipad
您可以使用此功能识别设备
大多数 UI 内容都可以仅使用自动调整大小参数来重做,但有些则不能。
另外,对于 iPhone/iPod 中不存在的特定类(如 UISplitViewController),您可以使用 NSClassFromString,它将返回对象类,如果无法加载,则返回 nil。
You can identify device using this
Most of the UI stuff can be redone just with autosizing parameters, but some don't.
Also for specific classes that do not exist in iPhone/iPod (like UISplitViewController) you can use NSClassFromString, which will return the object class or nil if cannot be loaded.
Q1: 是的,只需将您的项目转换为通用并使用相同的 id 提交即可。
Q2:相当简单,按照以下步骤将您的项目转换为通用项目 此处 (http://useyourloaf.com/blog/2010/4/7/converting-to-a-universal-app-part-i.html)。基本思想是从控制器中提取业务逻辑,并为 iPhone 和 iPad 使用不同的控制器。不要尝试使用如下
注释的代码块来实现它:
如果你用谷歌搜索,你会找到这个链接,不要使用它,它已经过时了 - http://iphonedevelopment.blogspot.com/2010/04/converting-iphone-apps-to-universal.html
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
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