Black bars showing when running app on iOS 7 (4 inch retina display)(在 iOS 7 上运行应用程序时显示黑条(4 英寸视网膜显示屏))
问题描述
We have an iPod
app built with base SDK
as 5.1.
App has a tabBarController
with three tabs and each tab has a UIViewController
to load a different view.
The app works fine for iOS 6.1
and iOS 7
(3.5 inch display) simulator and device but when we run the app on
iOS 7
(4 inch display simulator) or device we are getting black bars at the top and bottom of the view screen in all three tabs.
If anyone can suggest reason for this or some feasible solution to this problem, it would be really helpful for us.
Thanks
First thing is that you must add the required default image for 4 inch screen display. Check Properly in you project have image with name Default-568h@2x.png (640 × 1136 pixels)
This Default-568h@2x.png is Necessary for Support app in 4 inch Screen display
Ones you add this image in to you working Project, Remove old Build from device or Simulatore, clear Project and re build and check Hope you issue will solve.
Edit:-
After fix the black Bar issue you can check the device like my answer Give here check this:-
Detect device type
you have two choice if you can't use AutoLayout
First
Create two xib
with same class one for 3.5 inch screen and one for 4 inch screen set using macro with checking which screen appear.
Second
Set Self.view
frame using macro with checking which screen appear.
There are also other methods you can use for set self.view frame as using window
frame or UIScreen
这篇关于在 iOS 7 上运行应用程序时显示黑条(4 英寸视网膜显示屏)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:在 iOS 7 上运行应用程序时显示黑条(4 英寸视网膜显示屏)
基础教程推荐
- UIWebView 委托方法 shouldStartLoadWithRequest:在 WKWebView 中等效? 2022-01-01
- 如何在没有IB的情况下将2个按钮添加到右侧的UINavigationbar? 2022-01-01
- Android:对话框关闭而不调用关闭 2022-01-01
- 如何在 UIImageView 中异步加载图像? 2022-01-01
- 在 gmail 中为 ios 应用程序检索朋友的朋友 2022-01-01
- android 应用程序已发布,但在 google play 中找不到 2022-01-01
- 如何让对象对 Cocos2D 中的触摸做出反应? 2022-01-01
- Kivy Buildozer 无法构建 apk,命令失败:./distribute.sh -m “kivy"d 2022-01-01
- 当从同一个组件调用时,两个 IBAction 触发的顺序是什么? 2022-01-01
- 如何在 iPhone 上显示来自 API 的 HTML 文本? 2022-01-01