How do I switch UIsegmentedControl programmatically?

后端 未结 6 1500
孤独总比滥情好
孤独总比滥情好 2021-02-01 11:47

How do I switch UISegmentedControl programmatically ?

6条回答
  •  迷失自我
    2021-02-01 12:16

    Alternatively, after you have changed the selectedSegmentIndex call 'sendActionsForControlEvents:' for example

    segmentedControl.selectedSegmentIndex = 0
    
    [segmentedControl sendActionsForControlEvents:UIControlEventValueChanged];
    

提交回复
热议问题