开发者

Why are the default UI controls in my iPhone app blurred?

开发者 https://www.devze.com 2023-01-01 13:17 出处:网络
Why would the default iPhone interface elements, specifically the UISwitch (unmodified) and a UISegmentedControl appear slightly blurred? I have not changed them or called any private APIs. This blurr

Why would the default iPhone interface elements, specifically the UISwitch (unmodified) and a UISegmentedControl appear slightly blurred? I have not changed them or called any private APIs. This blurring occurs when I run it both in the simulator and when I load it on my iPod Touch, so I don't think it's a one off drawing glitch. These elements were created via some code (initWithFrame:) not in interface builder. Here is a screenshot of the blurring in the simulator: http://drp.ly/14rS6a

It looks similar on the actual device.

Thanks for 开发者_C百科your help


How are you positioning the elements on the UI? I saw this problem with UILabel when I was trying to center the label and the x or y position ended up being a float instead of an int, so it was trying to render the text on a half pixel and it looked very blurry. I truncated everything to an int and it looked normal

0

精彩评论

暂无评论...
验证码 换一张
取 消