开发者

Selecting and Deselecting segment on UISegmentedControl?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜