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

Why do the default iPhone interface elements, in particular UISwitch (unmodified) and UISegmentedControl, seem slightly blurry? I did not change them and did not name any private APIs. This blurring occurs when I run it both in the simulator and when I download it to iPod Touch, so I don’t think this is one of the draw failures. These elements were created using some code (initWithFrame :) not in the interface builder. Here's a screenshot of the blur in the simulator: http://drp.ly/14rS6a

It looks like an actual device.

thanks for the help

+4
source share
1 answer

How do you position elements in the user interface? I saw this problem with UILabel when I tried to center the label, and the x or y position turned out to be a floating point instead of int, so she tried to display the text on a half pixel and it looked very blurry. I trimmed everything to int and looked fine

+4
source

Source: https://habr.com/ru/post/1310895/


All Articles