UISegmentedControl *segment = [[UISegmentedControl alloc] initWithItems:@[@"normal", @"custom"]];
[segment setSelectedSegmentIndex:0];
[segment addTarget:self action:@selector(changeMapAction:) forControlEvents:UIControlEventValueChanged];
self.navigationItem.rightBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:segment];
UISegmentedControl
最新推荐文章于 2020-07-08 06:09:52 发布