0

我正在 iOS 6 中开发一个应用程序,它类似于表单填写应用程序。我使用 XML 来绘制 UI 元素,我的问题是每当
UILable 的 x,y 位置是整数时,例如 x="43" y="165" 文本都很好,但是当我将位置作为浮点值时,例如 x= "43.5" y="165.2" 文本看起来模糊或看起来像下图中应用的粗体

x="43" y="165"

正确的图像

x="43.5" y="165.2"

图像模糊

4

2 回答 2

2

since you can't render halve a pixel, text placed on halve pixels will get blurred as the rendering system will try and render the halve pixel.

What you can do in round the coordinates to make sure that there not halve pixels.

于 2012-12-10T15:24:31.403 回答
0

That's normal. Because your text is rendered in some sub-pixel area. That means you cannot make a pixel on the device display both your text and the background. But this should be fine if you use .5 position value in Retina Display. Because 1 point on Retina Display is 2 pixel.

于 2012-12-10T15:24:51.483 回答