Table 39-1Size (in pixels) of custom icons and images
Asset iPhone 6 Plus (@3x) iPhone 6 and iPhone 5 (@2x) iPhone 4s (@2x) iPad and iPad mini (@2x) iPad 2 and iPad mini (@1x)
iphone6/6+ 更新: Icon-Small@3x.png 87*87 Icon-40@3x.png 120*120 Icon-60@3x.png 180*180 Icon.png 57*57 Icon@2x.png 114*114 Icon-Small.png 29*29 Icon-Small@2x.png 58*58 Icon-Small-50.png 50*50 Icon-Small-50@2x.png 100*100 Icon-72.png 72*72 Icon-72@2x.png 144*144 Icon-40.png 40*40 Icon-40@2x.png 80*80 Icon-60.png 60*60 Icon-60@2x.png 120*120 Icon-76.png 76*76 Icon-76@2x.png 152*152
LaunchImage For iPhone 6 750 x 1334 (@2x) for portrait 1334 x 750 (@2x) for landscape For iPhone 6 Plus: 1242 x 2208 (@3x) for portrait 2208 x 1242 (@3x) for landscape ---------------------------------------------------------------------
4.0 inch screen: Default-568h@2x.png (old 640x1136 ~ for iPhone 5) 4.0 inch screen: LaunchImage-700-568h@2x.png (new 640x1136 ~ for iPhone 5)
4.7 inch screen: LaunchImage-800-667h@2x.png (750x1334 ~ for iPhone 6)
5.5 inch screen: LaunchImage-800-Portrait-736h@3x.png (1242x2208 ~ for iPhone 6 Plus Portrait) 5.5 inch screen: LaunchImage-800-Landscape-736h@3x.png (2208x1242 ~ for iPhone 6 Plus Landscape)
Retina iPad: Default-Portrait@2x~ipad.png (1536x2048 ~ for Retina iPad Portrait) Retina iPad: Default-Landscape@2x~ipad.png (2048x1536 ~ for Retina iPad Landscape) iPad Mini/iPad: Default-Portrait~ipad.png (768x1024 ~ for iPad Portrait) iPad Mini/iPad: Default-Landscape~ipad.png (1024x768 ~ for iPad Landscape)
適配iphone6/6+啟動(dòng)界面
如果舊的工程直接跑到這兩個(gè)模擬器中時(shí),默認(rèn)是"兼容模式",即系統(tǒng)會(huì)簡(jiǎn)單的把內(nèi)容等比例放大,顯示效果有些模糊但尚可接受。此時(shí)App內(nèi)部獲取到的設(shè)備分辨率和iPhone5是一樣的:320*568 point。
啟用高分辨率模式有2個(gè)方法: 1.添加大屏的LaunchImage: 在Images.xcassets里,刪除舊的LaunchImage組,然后新建LaunchImage組,添加對(duì)應(yīng)高分辨率的圖片。(參考:http:///blog/2014/09/10/iphone-6-plus-launch-image-adaptive-mode/)
2.添加Launch Screen File Launch Screen是Xcode6和iOS8新加的功能,它用一個(gè)xib文件來(lái)作為啟動(dòng)畫(huà)面。App在舊版iOS(低于ios8)啟動(dòng)時(shí),該屬性會(huì)被自動(dòng)忽略,不會(huì)造成異常。 首先,點(diǎn)擊New File ->iOS User Interface ->Launch Screen,然后在工程設(shè)置項(xiàng)里啟用它: LaunchFile
上面兩處設(shè)置,只要啟用任意一個(gè)即可讓App進(jìn)入高分辨率模式;但如果兩處都沒(méi)有設(shè)置,則App會(huì)回退到兼容模式。 兩處都設(shè)定的話(huà)在ios8會(huì)走Launch Screen File,在低于ios8 走LaunchImage
PS:iPhone4、iPhone5、iPhone6這幾個(gè)設(shè)備的ppi都是相同的,默認(rèn)圖片優(yōu)先是@2x。iPhone6 Plus的像素密度更高,默認(rèn)圖片優(yōu)先是@3x。 另外,iPhone6 Plus有一點(diǎn)和其他設(shè)備不同:在App內(nèi)部獲得的屏幕分辨率是1242*2208,但設(shè)備實(shí)際分辨率是1920*1080,這時(shí)系統(tǒng)會(huì)把整體的顯示內(nèi)容做一個(gè)縮放,downscale到1/1.15。
UIPageControl的autoresizingMask
在設(shè)置UIPageControl實(shí)例的寬度時(shí),顯示的好像總是設(shè)置的四倍左右,但是把其他組建(UILable等)設(shè)置在同一父容器中顯示的是正常的。頭文件看到UIPageControl的autoresizingMask默認(rèn)值是UIViewAutoresizingNone,但是感覺(jué)沒(méi)起作用,于是這是下 UIPageControl顯示正確了。(apple的bug?)
UIActivityViewController crashing on iPads by sdk8 其老早在 https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIActivityViewController_Class/ 中就說(shuō)了:On iPad, you must present the view controller in a popover. On iPhone and iPod touch, you must present it modally。 在sdk8之前你ipad還是用了presentViewController,那在dismissViewControllerAnimated的時(shí)候屏幕會(huì)旋轉(zhuǎn)下,可能你還能接受,但是在sdk8便會(huì)直接crash,報(bào)錯(cuò):
UIActivityViewController
"LaunchServices: invalidationHandler called" with UIActivityViewController iOS8 In iOS8 when I present or dismiss a UIActivityViewController, my app logs: "LaunchServices: invalidationHandler called"。 參考:https://developer.apple.com/library/ios/documentation/UIKit/Reference/UIPopoverPresentationController_class/index.html https://devforums.apple.com/message/1049415#1049415 http:///questions/25192313/sharing-via-uiactivityviewcontroller-to-twitter-facebook-etc-causing-crash 可能是蘋(píng)果的issue
ios sdk8/ios8 remoteNotification ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// 在蘋(píng)果UIApplication文件中說(shuō)明: @interface UIApplication (UIRemoteNotifications) . . .
- (void)registerForRemoteNotificationTypes:(UIRemoteNotificationType)types NS_DEPRECATED_IOS(3_0, 8_0, "Please use registerForRemoteNotifications and registerUserNotificationSettings: instead");
// Returns the enabled types, also taking into account any systemwide settings; doesn't relate to connectivity. - (UIRemoteNotificationType)enabledRemoteNotificationTypes NS_DEPRECATED_IOS(3_0, 8_0, "Please use -[UIApplication isRegisteredForRemoteNotifications], or -[UIApplication currentUserNotificationSettings] to retrieve user-enabled remote notification and user notification settings");
@end //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
所以在ios8中應(yīng)該用的新的注冊(cè)通知的代碼:
原本在IOS7當(dāng)中 判斷push是否打開(kāi)的方法是:
如果將這段代碼使用在 IOS8當(dāng)中,雖然不會(huì)出現(xiàn)crash的現(xiàn)象,但永遠(yuǎn)返回空。 在IOS8中,我們使用如下的新代碼來(lái)取代以上的代碼:
ios 8 - buttons in horizontal scroll view intercepting pan event - scroll does not work 含有uibutton的ScrollView在iOS8中無(wú)法滾動(dòng)的解決辦法:
轉(zhuǎn)載:http://justsee./blog/2123545
|
|