1.UISegmentedControl
UISegmentedControl是通过selectedSegmentIndex选择的
- (IBAction)segmentedTouch:(id)sender { UISegmentedControl *sm = (UISegmentedControl *)sender; switch (sm.selectedSegmentIndex) { case 0: self.rightSwitch.hidden = YES; self.leftSwitch.hidden = NO; break; case 1: self.rightSwitch.hidden = NO; self.leftSwitch.hidden = YES; break; default: break; } }
时间: 2024-11-08 23:55:37