在Xcode6 中建立的app,在ios7.1的iphone5設備和iphone模擬器中不能顯示全屏,用 [UIScreen mainScreen].bounds.size.height獲得的值居然是480!ios
從stackoverflow中找到的答案:xcode
原文地址 http://stackoverflow.com/questions/25817562/black-bars-appear-in-app-when-targeting-ios7-1-or-7-0-in-xcode6app
原有就是Xcode的一個bug(可是遲遲沒有唄修復,我以爲時蘋果想讓你們升級到ios8的緣由吧),只有修改LaunchImages才行,步驟:iphone
1. Targets --> yourApp --> General -->App icons and launch images --> launch Images Source ;code
2. 點擊 Use Asset Catalog, 會彈出 Migrate launch images to an asset catalog 的提示,選擇默認的 Images 選項,點 Migrate.ip
作完以上步驟,噹噹噹,Run,一切ok,反正個人是這樣解決的。get
---------------Update-------------io
解決了ios7.1的問題,隨之而來的時新問題:iPhone6和plus的屏幕一直是iphone5的screen height.date
緣由是沒有對應的Launch Image, 須要新建LaunchImage set,而後添加。ios7