A: 

in your view frames, you probably have float values that are not integers. While the frames are precise enough to do fractions of a pixel (float), you will get blurriness unless you cast to an int

CGRect frame = CGRectMake((int)self.frame.bounds..., (int)...., (int)...., (int)....);
coneybeare
+6  A: 

Since a stroke expands equal amounts to both sides, a line of one pixel width must not be placed on an integer coordinate, but at 0.5 pixels offset.

Calculate correct coordinates for stroked lines like this:

CGPoint pos = CGPointMake(floorf(pos.x) + 0.5f, floorf(pos.y) + 0.5f);

BTW: Don't cast your values to int and back to float to get rid of the decimal part. There's a function for this in C called floor.

Nikolai Ruhe
In addition to this, Apple provides some nice tips and sample code in the "Doing Pixel-Exact Drawing" section of the Cocoa Drawing Guide: http://developer.apple.com/mac/library/documentation/Cocoa/Conceptual/CocoaDrawingGuide/Transforms/Transforms.html#//apple_ref/doc/uid/TP40003290-CH204-BCICIJAJ
Brad Larson