Note that there are some explanatory texts on larger screens.

plurals
  1. POCustomizing UISegmentedControl in iOS 5
    primarykey
    data
    text
    <p>Here is my problem. I am customizing a UISegmentedControl by setting the background and divider images in the following way:</p> <pre><code>[[UISegmentedControl appearance] setDividerImage:segmentUnselectedUnselected forLeftSegmentState:UIControlStateNormal rightSegmentState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; [[UISegmentedControl appearance] setDividerImage:segmentSelectedUnselected forLeftSegmentState:UIControlStateSelected rightSegmentState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; [[UISegmentedControl appearance] setDividerImage:segUnselectedSelected forLeftSegmentState:UIControlStateNormal rightSegmentState:UIControlStateSelected barMetrics:UIBarMetricsDefault]; [[UISegmentedControl appearance] setBackgroundImage:segmentUnselected forState:UIControlStateNormal barMetrics:UIBarMetricsDefault]; [[UISegmentedControl appearance] setBackgroundImage:segmentSelected forState:UIControlStateSelected barMetrics:UIBarMetricsDefault]; </code></pre> <p>When I try to make the 1st segmented selected within <code>viewDidLoad</code></p> <pre><code>self.segmentedControl.selectedIndex = 1; </code></pre> <p>I get the following weird thing:</p> <p><img src="https://i.stack.imgur.com/x3zOB.png" alt="enter image description here"></p> <p>instead of: </p> <p><img src="https://i.stack.imgur.com/abymP.png" alt="enter image description here"></p> <p>Does anyone know if this is a bug and how could I provide a bug report? If not, what could be wrong with my code?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload