显示地图以适合iPhone的所有屏幕
我这样做是为了显示地图:
[self setMapView:[[[RMMapView alloc]initWithFrame:CGRectMake(0.0, 0.0, 400, 200)]autorelease]];
400 和 200 值用于宽度和高度,我需要更改它以适合所有屏幕,提前感谢:)
i do this in order to display the map :
[self setMapView:[[[RMMapView alloc]initWithFrame:CGRectMake(0.0, 0.0, 400, 200)]autorelease]];
the 400 and 200 values are for width and height, i need to change it to fit all the screen, thanx in advance :)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能可以在 google 上搜索 iPhone 屏幕的尺寸,但它们是:480x320pt,包括状态栏。状态栏为 20pt。
您还可以向 [UIApplication sharedApplication].keyWindow 询问其框架。
You could probably google the dimensions of an iPhone screen, but here they are: 480x320pt including status bar. The status bar is 20pt.
You can also ask [UIApplication sharedApplication].keyWindow for its frame.