The following are some of your friendly support:
I have made a product that requires popularity support. I search for # super junior # on Android and iPhone, or download it directly on the page.Http://m.ixingji.com/m.html? P = x16.
Today, Apple released ios6, and may soon be able to see iPhone 5. But now we can only test it from the simulator.Program.
How to develop or adapt to iPhone 5 4 inch screens
1. Install xcode 4.5 and select the Retina (4-inch) Startup screen,
2. Add boot image, Default-568h@2x.png, resolution640*1136 pixels,If not added, it will be as follows:
3. When coding, try not to write 480 to death. Selecting size based on the current screen ([uiscreen mainscreen]. bounds) saves a lot of trouble when the resolution is changed.
StackoverflowCodeHow to determine the iPhone 5
[HTML] View plaincopyprint?
- # Define is_iphone_5 (FABS (double) [[uiscreen mainscreen] bounds]. Size. Height-(double) 568)< Dbl_epsilon)
# Define is_iphone_5 (FABS (double) [[uiscreen mainscreen] bounds]. Size. Height-(double) 568) <dbl_epsilon)
If you want to serve as an iPad
[HTML] View plaincopyprint?
- < P Class = P1 > # Define is_widescreen (FABS (double) [[uiscreen mainscreen] bounds]. Size. Height-(double) < Span Class = S1 > 568 </ Span > ) < Dbl_epsilon ) </ P > < P Class = P1 > # Define is_iphone ([[uidevice currentdevice] model] isequaltostring :@ < Span Class = S2 > "IPhone" </ Span > ]) </ P > < P Class = P1 > # Define is_iphone_simulator ([[[uidevice currentdevice] model] isequaltostring :@ < Span Class = S2 > "IPhone Simulator" </ Span > ]) </ P > < P Class = P1 > # Define is_ipod ([[uidevice currentdevice] model] isequaltostring :@ < Span Class = S2 > "IPod Touch" </ Span > ]) </ P > < P Class = P1 > # Define is_iphone_5 (is_iphone) | (is_iphone_simulator) & is_widescreen) </ P >
# Define is_widescreen (FABS (double) [[uiscreen mainscreen] bounds]. Size. Height-(double)568) <Dbl_epsilon)
# Define is_iphone ([[uidevice currentdevice] model] isequaltostring :@"IPhone"])
# Define is_iphone_simulator ([[[uidevice currentdevice] model] isequaltostring :@"IPhone Simulator"])
# Define is_ipod ([[uidevice currentdevice] model] isequaltostring :@"IPod Touch"])
# Define is_iphone_5 (is_iphone) | (is_iphone_simulator) & is_widescreen)
Then, you can determine if the iPhone 5 is needed on each page to adjust it slowly. This experience of writing pure code to the iPad and iPhone of the universal edition can be understood more.
4. (This is copied elsewhere) mainwindow. XIB file, in simulate In D metrics, set the size of the window to retina 4 full screen. Create a 3.5-inch uiwindow for the original screen, and create the corresponding members in appdelegate. When the app starts, two windows will be created. The window to be used is determined based on the current screen size and the other will be hidden.
or manually create a window when the launch app is created, rather than the mainwindow automatically created when the project is created. XIB. When manually creating the main window, pay attention to modifying the default configuration file. Otherwise, if the XIB file is deleted and the app tries to load the file, the file will crash and the nsmainnibfile field in the plist file will be deleted.
5. Another articleArticle:
Http://blog.csdn.net/linzhiji/article/details/8000125
From: http://blog.csdn.net/linzhiji/article/details/8000048