[[UIScreen mainScreen] bounds] 返回的屏幕尺寸不对
在使用cocos2d-iphone 2.0生成项目的时候,用5s测试时全屏中上下一直有黑条,发现[[UIScreen mainScreen] bounds]返回的屏幕尺寸不是320*568的,而是320*480。后来在项目的警告中发现提示缺少Default-568@2x.png:

单击之后弹出:

点击add之后再运行项目就可以得到320*568的全屏了!
另外,要隐藏statusBar还需要在info.plist中添加一条View controller-based status bar appearance的设置为NO
[[UIScreen mainScreen] bounds] 返回的屏幕尺寸不对的更多相关文章
- ios中[UIScreen mainscreen].bounds 的大小是由什么决定的?
ios中经常会用[UIScreen mainScreen].bounds 来获取屏幕的frame,但最近网上下载了个项目,在模拟器运行起来,打印[UIScreen mainScreen].bounds ...
- [[UIScreen mainScreen] bounds]获取尺寸不对
http://www.cocoachina.com/bbs/read.php?tid-264373.html [[UIScreen mainScreen] bounds]获取尺寸不对 我在 ...
- [UIScreen mainScreen].bounds.size.width 和self.view.frame.size.width的区别
self.view.frame.size.width在导航栏titleView计算frame时会出现宽度不准确的情况,布局出现问题,[UIScreen mainScreen].bounds.size. ...
- [UIScreen mainScreen].applicationFrame与[UIScreen mainScreen].bounds区别
[UIScreen mainScreen].applicationFrame与[UIScreen mainScreen].bounds区别: applicationFrame会自动判断是否存在状态栏, ...
- IOS 获取屏幕尺寸
CGRect frame = [[UIScreen mainScreen] bounds]; NSLog(@"frame :%@",frame); 这样输入是null NSL ...
- iOS之获取屏幕尺寸
//app尺寸,去掉状态栏 CGRect appRect = [UIScreenmainScreen].applicationFrame; NSLog(@"%f, %f, %f,%f&quo ...
- iOS屏幕尺寸和分辨率了解
1.截至目前为止,主流的iOS设备屏幕有以下几种: --------------- iPhone ---------- -------- iPad ------------ 2.iOS设备屏幕分 ...
- iosiPhone屏幕尺寸、分辨率及适配
iosiPhone屏幕尺寸.分辨率及适配 1.iPhone尺寸规格 设备 iPhone 宽 Width 高 Height 对角线 Diagonal 逻辑分辨率(point) Scale Fac ...
- iPhone屏幕尺寸、分辨率及适配
转:http://blog.csdn.net/phunxm/article/details/42174937 目录(?)[+] 1.iPhone尺寸规格 设备 iPhone 宽 Width 高 H ...
随机推荐
- Linux:Vmware安装linux虚拟机,桥接方式配置静态IP后重启网卡,提示:Error,some other host already uses address 10.252.252.21...
问题: Vmware安装linux虚拟机,桥接方式配置静态IP后重启网卡,提示:Error,some other host already uses address 10.252.252.21... ...
- ARCGIS如何进行可视域分析
可视域分析在不同的领域有着广泛的应用,如火灾监控点的设定,观察哨所的设定等等.军事领域是可视域分析技术应用最广的领域.例如为了设计巡航导弹的航线,就必须对发射点到目标的地形进行分析,包括地形特征优劣分 ...
- for..in遍历,枚举器
#pragma mark ------------for循环遍历集合中的元素------ //创建一个数组,包含5个字符串对象,倒序取出数组中的所有元素,并存储到另一可变数组中 NSArray *ar ...
- NPM 相关
1. 官方网站 https://docs.npmjs.com/ 2. 显示Global Module安装过什么 p.p1 { margin: 0.0px 0.0px 0.0px 0.0px; font ...
- Modified Least Square Method and Ransan Method to Fit Circle from Data
In OpenCv, it only provide the function fitEllipse to fit Ellipse, but doesn't provide function to f ...
- COM中需要调用AddRef和Release的10条规律
COM中需要调用AddRef和Release的10条规律
- Python 无限循环
import threading import time class CountDownTimer(threading.Thread): def __init__(self, seconds, act ...
- sharepoint webpart
SharePoint开发中,不仅仅是WebPart,我们都经常会使用的几个关键位置,如下: GAC: C:\Windows\assembly,也就是部署的位置: ISAPI位置,SharePoint ...
- Linux内核中断学习
1.内核中断概述 (1)在OS环境下编写中断处理函数与之前在裸机中编写中断处理函数的方式是不一样的,在Linux内核中提供了一套用来管理硬件中断资源的软件体系架构. (2)在操作系统中,中断号与gpi ...
- unity3d 射弹基础案例代码分析
#pragma strict import UnityEngine.UI; function Start () { } var speed : int = 5; var newobject : Tra ...