UISegmentedControl

来源:互联网 发布:深沟寺北国知春 编辑:程序博客网 时间:2024/06/04 01:21
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];

0 0
原创粉丝点击