为什么iOS 7修改我的文本字段';iPad的边界是什么?

为什么iOS 7修改我的文本字段';iPad的边界是什么?,ios,iphone,ipad,uitextfield,Ios,Iphone,Ipad,Uitextfield,我正在我的特克斯区设置边界。我把它们放在没有边界的地方 [self.localeField.layer setBackgroundColor: [[UIColor whiteColor] CGColor]]; [self.localeField.layer setBorderColor: [[NVGlobals border4MEColor] CGColor]]; [self.localeField.layer setBorderWidth: 0.5]; 问题在于,在iphone和iPad应用

我正在我的特克斯区设置边界。我把它们放在没有边界的地方

[self.localeField.layer setBackgroundColor: [[UIColor whiteColor] CGColor]];
[self.localeField.layer setBorderColor: [[NVGlobals border4MEColor] CGColor]];
[self.localeField.layer setBorderWidth: 0.5];
问题在于,在iphone和iPad应用程序之间,文本字段有不同的边界:

正确的iPhone视图:

错误的iPad视图:


为什么?

您的边框宽度是0.5。我猜你的iPhone是视网膜设备,而你的iPad不是。在标准(非基于视网膜的)设备上进行亚像素大小调整后,视觉效果变得毛茸茸的。如果可能的话,我会避免的

尝试:


哇,我很惊讶。非常感谢,星期一我回去工作的时候我会试试的!
[self.localeField.layer setBorderWidth: 1.0/[UIScreen mainScreen].scale]];