在ios中启动通用应用程序时应采取的标准和注意事项
您好,我需要从头开始创建一个通用应用程序。启动应用程序时是否需要考虑任何标准或预防措施。任何人都可以引导我访问一些不错的博客或教程,以便我可以开始使用它。提前致谢。
Hi i need to create a universal application from scratch.are they any standards or precautions to be taken into consideration while starting a application.Can any one please steer me to some nice blogs or tutorials so that i can begin with it.Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
许多教程实际上都是用于将应用程序从 iPhone 移植到通用风格的应用程序。
我从这里开始:
"iOS 应用程序编程指南 - 通用应用程序"
这作为风格指南非常有用:
“iOS 人机界面指南”
以及这些有用的特定 iOS 控件:
UISplitViewController
UIPopoverController
UIPopoverController 特别是您需要将图像选择器等内容包装起来的东西。
如果还有什么问题可以在评论里问,我可以更新。
A lot of the tutorials that are out there are really for porting applications from iPhone to Universal style apps.
I'd start here:
"iOS App Programming Guide - Universal Apps"
This is useful as a style guide:
"iOS Human Interface Guidelines"
As well as these specific iOS controls that are useful:
UISplitViewController
UIPopoverController
The UIPopoverController in particular is what you'll need to wrap things in like the image picker.
If there's anything else ask in comments and I can update.
根据我的经验,编写通用应用程序时必须注意三件事:
1:大小。如果您本地化所有这些 xib,或者为每个设备创建单独的类,您的应用程序很容易变得臃肿,或者您的方法文件很容易变得繁琐且难以使用。此外,捆绑包大小的增加可能会让您超过通过 3G 下载的应用程序的 20 MB 限制,从而疏远一小部分潜在买家。
2:测试。现在,您的应用程序不仅要求您在旧款 iPhone 上进行测试,还要求您在旧款 iPad 上进行测试。假设您需要向后兼容性,则需要分发大量构建!如果您只是想保持对 4.x 及更高版本的支持,那么模拟器总是存在的,但即便如此,与实际设备相比,模拟器还是很古怪。 Apple 必须更改多个驱动程序并删除一些功能才能让模拟器运行,即使如此,它基本上也是一个 Mac 应用程序(因此它可以完全访问更强大的 CPU、GPU 等)。
3:用户界面。当 iPhone 首次推出并随 iPhone OS 2.0 一起推出应用程序商店时,iPhone 的小屏幕给习惯了 27 英寸 iMac 的 Mac 开发人员带来了一些设计挑战和重大转变。然后 iPad 的出现再次改变了这一切! iPhone 和 iPod 前端的用户往往希望在不牺牲功能的情况下获得更精简且符合人体工程学的用户界面,而 iPad 用户则倾向于希望将功能塞进设备中,但这些功能可以在尽可能少的屏幕或向导上轻松访问。
也就是说,这些是编写通用二进制文件的危险,但这绝不应该阻止您。通用二进制文件往往会让大多数人感到高兴,尽管它们基本上需要付出两倍的工作,但最终通常是值得的。
编辑:我刚刚意识到,在线编写通用应用程序的好教程并不多……也许 Wenderlich 先生很快就会制作一个……
In my experience there are 3 things you must be cautioned of when writing universal applications:
1: Size. Your app can easily become bloated if you localize all of those xibs, or make separate classes for each device, or your method files could easily become cumbersome and hard to work with. Also, the increased size of your bundle just might push you over the 20 mb limit for apps downloaded over 3G, thus alienating a small portion of potential buyers.
2: Testing. Your app now requires you to test on not just older iPhones, but now older iPads. Assuming you need backwards compatibility, that's a lot of builds to distribute! If you just want to keep support for 4.x and later, there is always the simulator, but even then, the simulator is wacky when compared to an actual device. Apple had to alter several drivers and strip out some features to get that simulator running, and even then, it's basically a Mac app (so it has full access to the more powerful CPU, GPU, etc.).
3: User Interface. When the iPhone was first introduced and the app store was launched with iPhone OS 2.0, the iPhone's tiny screen made for some design challenges and big transitions for Mac developers who were used to 27'' iMacs. Then the iPad came along and changed all that again! Users on the iPhone and iPod front tend to want a more scaled back and ergonomic user interface without sacrificing features, whereas the iPad crowd tend to want features jammed into the thing, but features that are easily reachable on as few screens or wizards as possible.
That said, These are the perils of writing universal binaries, and in no way should this deter you. Universal binaries tend to make most people happy and though they basically take twice the work, they are often worth it in the end.
EDIT: I just realized that there aren't many good tutorials for writing universal applications online... Maybe Mr. Wenderlich will make one soon...