I noticed that on a non-retina iPad there was some anti-aliasing going on. This is because the center point was being rounded to integer pixels rather than the origin. For items with an odd width, the center point should in fact be a half pixel. Flooring the center offsets the frame by 0.5 pixels, which is the opposite of what we want. Items with an even width don't have this problem because their center and origin will always fall on an integer.
Here's how it looks
Logging some values right before adding attributes to itemAttributes produced the following, which confirms the above:
x origin: 291.000000, width: 466.000000, center x: 524.000000
x origin: 407.500000, width: 301.000000, center x: 558.000000
x origin: 724.000000, width: 150.000000, center x: 799.000000
x origin: 771.500000, width: 159.000000, center x: 851.000000
x origin: 888.500000, width: 241.000000, center x: 1009.000000
x origin: 945.500000, width: 137.000000, center x: 1014.000000
Instead of flooring the center, which I assume was intended to prevent blurring, I tried using CGRectIntegral and everything looks good.
x origin: 291.000000, width: 466.000000, center x: 524.000000
x origin: 408.000000, width: 301.000000, center x: 558.500000
x origin: 724.000000, width: 150.000000, center x: 799.000000
x origin: 772.000000, width: 159.000000, center x: 851.500000
x origin: 889.000000, width: 241.000000, center x: 1009.500000
x origin: 946.000000, width: 137.000000, center x: 1014.500000
I noticed that on a non-retina iPad there was some anti-aliasing going on. This is because the center point was being rounded to integer pixels rather than the origin. For items with an odd width, the center point should in fact be a half pixel. Flooring the center offsets the frame by 0.5 pixels, which is the opposite of what we want. Items with an even width don't have this problem because their center and origin will always fall on an integer.
Here's how it looks
Logging some values right before adding
attributes
toitemAttributes
produced the following, which confirms the above:Instead of flooring the center, which I assume was intended to prevent blurring, I tried using CGRectIntegral and everything looks good.