0

我开发了一个 iPhone 应用程序。我想制作与 iPad 相同的应用程序版本。您需要更改 iPhone 的版本吗?iPad版本需要什么?我只是更改我的 UI 设计还是代码中的任何地方必须更改?

谢谢,

4

3 回答 3

1

您需要更改摘要中的设备(项目导航器中的项目 -> 目标下的应用程序 -> 摘要 -> 设备 -> iPad/iPhone/Universal)。您可以使用此代码检查应用程序在哪个设备上运行。然后,您可以加载不同的 xib 文件并针对特定设备调整视图。

if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone)
{
    viewController = [[[ViewController alloc] initWithNibName:@"ViewController_iPhone" bundle:nil] autorelease];
} else
{
   viewController = [[[ViewController alloc] initWithNibName:@"ViewController_iPad" bundle:nil] autorelease];
}
于 2012-06-26T07:44:47.243 回答
0

选择目标并进一步进入捆绑设置

转到部署选项卡,然后在“目标设备系列”中选择“iPad”

然后将所有 Xib 转换为 ipad 分辨率。

于 2012-06-26T08:01:44.793 回答
0

在项目导航器中选择你的项目文件,然后选择你的目标 -> 摘要 -> iOS 应用程序目标 -> 确保它是 iPad 可卡的。然后就只剩下设计了...

于 2012-06-26T07:40:14.937 回答