tailieunhanh - iOS App Programming Guide phần 9

Nếu người dùng chọn để lưu các phiên bản xung đột dưới một tên khác nhau, tạo ra các tập tin mới với những nội dung của phiên bản xung với mỗi đối tượng phiên bản tập tin, thực hiện bất cứ hành động cần thiết để giải quyết cuộc xung đột. | CHAPTER 6 Advanced App Tricks For example to indicate that you want your app to launch in a portrait orientation on iPhone and iPod touch devices but in landscape-right on iPad you would configure your with the following keys key UIInterfaceOrientation key string UIInterfaceOrientationPortrait string key UIInterfaceOrientation ipad key string UIInterfaceOrientationLandscapeRight string Notice that in the preceding example there is an iPad-specific key and a default key without any device modifiers. Continue to use the default key to specify the most common or default value and add a specific version with a device-specific modifier when you need to change that value. This guarantees that there is always a value available for the system to examine. For example if you were to replace the default key with an iPhone-specific and iPad-specific version of the UIInterfaceOrientation key the system would not know the preferred starting orientation for iPod devices. For more information about the keys you can include in your file see Information Property List Key Reference Implementing Your View Controllers and Views The largest amount of effort that goes into creating universal apps is designing your user interface. Because of the different screen sizes apps often need completely separate versions of their interface for each device idiom. This means creating new view hierarchies but might also mean creating completely different view controller objects to manage those views. For views the main modification is to redesign your view layouts to support the larger screen. Simply scaling existing views may work but often does not yield the best results. Your new interface should make use of the available space and take advantage of new interface elements where appropriate. Doing so is more likely to result in an interface that feels more natural to the user and not just an iPhone app on a larger screen. For view controllers follow these guidelines Consider .