I've added a segmented control as the right bar button item of my navigation bar. The control has two segments and I'm attempting to use the control as bar button items. So I was wondering haw can I deselect a selected segment once the user preses it. I've already tried setting the selectedSegmentIndex property to -1 when the action method is called but that is preventing the segment from even being highlighted. Any idea on how can can get the segments to behav开发者_StackOverflow社区e like bar button item?
do segmentedControl.momentary = YES;
during setup or if using IB, select the Momentary
checkbox in the Attributes Inspector
.
精彩评论