简体   繁体   English

iPad2与iPad3手动定位的项目有变化吗?

[英]iPad2 vs iPad3 manually positioned items changing?

since the iPad 3("The New iPad") has twice the pixels I obliviously have my make any images twice as big. 因为iPad 3(“新iPad”)的像素是我的两倍,所以我显然不让任何图像放大一倍。 But my question is since it has twice the pixels if I am manually placing an object on screen, with say CGRectMake, will it appear in different places on the iPad2 from the iPad3? 但是我的问题是,如果我在屏幕上手动放置一个对象(比如说CGRectMake),它的像素是原来的两倍,它会出现在iPad2和iPad3的不同位置吗?
say I'm using the code below to position a button on screen: 说我正在使用下面的代码在屏幕上放置一个按钮:

 CGRectMake(375,500,125,125); 

since its positioned at 375 pixels on the X coordinate wouldn't it appear in different places on the iPad 2 vs the iPad3 since the iPad3 has twice as many pixels? 因为它在X坐标上的位置为375像素,难道它不会出现在iPad 2与iPad3的不同位置上,因为iPad3的像素是它的两倍吗?

I'm sure this is a dumb question that any mildly experienced iOS developer would laugh at but since a simple Google search didn't turn anything up I figured id ask. 我确信这是一个愚蠢的问题,任何有经验的iOS开发人员都会笑,但是由于简单的Google搜索并没有发现任何问题,所以我想了想。

Thanks! 谢谢!

-Shredder2794 -Shredder2794

Though the amount of pixels may differ among devices, Core Graphic's coordinate system does not. 尽管不同设备之间的像素数量可能有所不同,但Core Graphic的坐标系没有差异。 This is because CG expresses itself in points, not pixels. 这是因为CG用点而不是像素表示。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM