How does UISegmentedControl resize its content images?

I'm having trouble adjusting images for segments in UISegmentedControl. I believe that this only happens when oversized images (exceeding the segment boundaries) are installed, and I know that the correct solution would be to use the appropriate images first. However, I observed a strange resizing with those large images that I would like to understand:

These are two screenshots of the same UISegmentedControl. The only difference is that I use different images for my segments.


Segmented control with oversized square image Segmented control with oversized non-quadratic image


I encoded the color control components as follows:

  • Yellow: segment separator

  • Black: segment background

, . , . , .

-, iOS -. - , ? iOS ?

+4

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


All Articles