Why creating an IOS application using window base template created two device application folder?
I am new in iphone application开发者_如何学运维 and wanted to see why there are two separate environment when creating an application. When I selecting the template to build my application there are two devices to choose from. Some templates has iphone, or ipad only and one for universal. Since my project wants to work on both iphone and ipad, I choose the template with universal option. It creates two subcategories: iphone and ipad. Does that mean I have to implement both of them ? What are the differences between them?
Yes, the screen sizes of the two devices are different. So they both have different sized XIB files. You can use the same code for both iPhone and iPad, but generally, since the iPad has a bigger screen, it is designed differently than the iPhone version and has more code to it.
Yes, like Jack said, the main difference is the screen size. Hence, the two nib files. The iPad has a lot more real state (i.e. space) because the screen is significantly bigger. Thus, you need to design your UI specifically for that screen size.
Additionally, you are going to want to use that extra space to make a richer UI and consequently a better UX. For example, lots of iPad apps use a UISplitViewControllers
to exploit that extra space.
For the rest of your logic and algorithms, you can use the same code because both devices are running iOS.
I haven't checked it out but I know the topic about creating universal apps is covered in section 7 of the Stanford course Developing Apps for iOS
精彩评论