我有一个 UISegmentedControl,用于加载其他 UIViewController。当返回时,我希望看到它没有选择。我尝试设置 selectedSegmentIndex=-1 和 selected=NO,但它们没有起作用。有什么建议吗?
我有一个 UISegmentedControl,用于加载其他 UIViewController。当返回时,我希望看到它没有选择。我尝试设置 selectedSegmentIndex=-1 和 selected=NO,但它们没有起作用。有什么建议吗?
selectedSegmentIndex
设为-1
应该能够工作。你确定你的插座已经连接?你的UISegmentedControl
实例是否为空? - Mark Adams