Reputation: 2330
I am developing an application in iOS 6 , It is something like form filling application.
I use XML for drawing the UI elements, my problem is that whenever the x,y positions of
UILable is in integer like x="43" y="165" the texts are fine but when I get position as float value like x="43.5" y="165.2" the text is looking blurred or look like bold applied like in the below images
x="43" y="165"
x="43.5" y="165.2"
Upvotes: 0
Views: 264
Reputation: 69469
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.
Upvotes: 2
Reputation: 1427
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.
Upvotes: 0