UISegmentedControl change number of segments programmatically

后端 未结 7 1196
时光说笑
时光说笑 2020-12-14 05:26

Is there a way to change the number of segments programmatically?

7条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-14 06:08

    Yes, you can use

    removeSegmentAtIndex:(NSUInteger) animated:(BOOL)
    

    And

    insertSegmentWithTitle:(NSString *) atIndex:(NSUInteger) animated:(BOOL)
    

提交回复
热议问题