如何创建通用应用程序? [英] How to create Universal application?

查看:98
本文介绍了如何创建通用应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能为iphone和ipad创建相同的应用程序。如果是的话请清楚解释iphone的所有控件(uitabelview,uiimageview等...)将适用于ipad。

Is there a possibility to create a same application for both iphone and ipad.If yes means please clearly explain all controls(uitabelview,uiimageview etc...) for iphone will work for ipad.

还给我一个相关研究的链接......

And also give me a link for related studies...

推荐答案

创建一个通用应用程序非常容易--Xcode甚至有一个项目可以为你做一些初始设置。

It's quite easy to create a universal app - Xcode even has a project that does some of the initial set up for you.

但是,我认为推荐的方法是为两个目标中的每一个使用不同的NIB文件/资源​​,并为每个设备使用适当的UIKit对象,因为虽然iPad支持所有标准的UIKit对象,但有些只能在iPad上使用。 (请参阅特定于iPad的控制器部分在适用于iOS的View Controller编程指南中获取完整的详细信息。)

However, I believe the recommended approach is to use different NIB files/resources for each of the two targets and to use the appropriate UIKit objects for each device, as whilst the iPad supports all of the standard UIKit objects, there are some that are only available on the iPad. (See the "iPad-Specific Controllers" section within the View Controller Programming Guide for iOS for the full details.)

因此,您通常会发现您使用的是一组共享的模型对象,但它确实很根据您所需的功能,可能更容易为每个设备简单地使用不同的视图控制器。

As such, you'll generally find that you use a shared set of model objects, but it's quite possibly easier to simply use different view controllers for each device depending on your required functionality.

我建议您阅读介绍适用于iPhone OS的通用应用程序 PDF是一个很好的第一步,因为它概述了您需要处理的一些问题。

I'd recommend reading the Introducing Universal Applications for iPhone OS PDF, as a good first step, as it outlines some of the issues you'll need to deal with.

这篇关于如何创建通用应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆