草庐IT

userIDSegmentActive

全部标签

ios - UISegmentedControl 不工作

您好,我正在尝试使用分段控件在三个mapView之间切换,但它不起作用。我的IBAction方法如下。-(IBAction)segmentSwitch:(id)sender{NSLog(@"insidesegmentedswitch");NSLog(@"selectedsegment%@",selectedSegment);if(selectedSegment==0){mapView.mapType=MKMapTypeStandard;}else{mapView.mapType=MKMapTypeHybrid;}}我已将UISegementedControl声明为导出并将其连接到xib