Question: I am having a problem with a UITextField's text being blurred/anti-aliased even with a standard font size. The text will appear crisp when the control is the first responder, but blurred again when it loses focus:

[![alt text](https://i.stack.imgur.com/kmcmI.png)](https://i.stack.imgur.com/kmcmI.png)  

(source: [mikeweller.com](http://www.mikeweller.com/images/blog/UITextFieldBlur.png)) 

Does anybody know how to fix this?

Answer: 
Use [CGRectIntegral](http://developer.apple.com/IPhone/library/documentation/GraphicsImaging/Reference/CGGeometry/Reference/reference.html#//apple_ref/c/func/CGRectIntegral) to make sure the text fields' frames are based on integer coordinates. You'll get fuzzy antialiasing when things lie on fractional coordinates.
I encountered this problem before. The solution below works perfectly for any text or frame size because it uses the round function to get rid of the fractional pixel values. Insert the following code after your instantiation of the uitextfield in question. 

```
CGRect temp = textField.frame;
temp.origin.x = round(temp.origin.x);
temp.origin.y = round(temp.origin.y);
textField.frame = temp;

```