iPhone - UISegmentedControl segment width = 0? -


i have uisegmentedcontrol 3 segments , want change width of 1 segment 1 when user chooses segment. here code:

// uisegmentedcontrol created [segmentedcontrol addtarget:self action:@selector(changeit:)                 forcontrolevents:uicontroleventvaluechanged];  //...   // , changeit method:   - (void) changeit:(id)sender {      // discover original width of segment 1, restore later     uisegmentedcontrol *seg = (uisegmentedcontrol*)sender;     cgfloat segwidth = [seg widthforsegmentatindex:1];     // @ point segwidth = 0 ?????????????????     // note: seg not nil @ point. printing seg console shows     // valid uisegmentedcontrol...  } 

any clues? thanks.

documentation says "the default value {0.0}, tells uisegmentedcontrol automatically size segment."


Comments

Popular posts from this blog

c# - SharpSVN - How to get the previous revision? -

c++ - Is it possible to compile a VST on linux? -

url - Querystring manipulation of email Address in PHP -