标签:style class c t tar sp get cti re view 代码
UINavigationBar *navBar = [[UINavigationBaralloc] initWithFrame:CGRectMake(0, 0, 824, 44)];
navBar.barStyle = UIBarStyleDefault;
UINavigationItem *navItem = [[UINavigationItemalloc] init];
navItem.leftItemsSupplementBackButton = YES;
navItem.title = @"Add CRA";
UIBarButtonItem *leftButton = [[UIBarButtonItemalloc] initWithTitle:@"Back"
style:UIBarButtonItemStylePlain
target:self
action:@selector(back)];
navItem.leftBarButtonItem = leftButton;
UIBarButtonItem *rightButton = [[UIBarButtonItemalloc] initWithTitle:@"Done"
style:UIBarButtonItemStylePlain
target:self
action:@selector(done)];
navItem.rightBarButtonItem = rightButton;
navBar.items = @[navItem];
[self.view addSubview:navBar];
添加navbar以及上面的左右按钮代码,码迷,mamicode.com
标签:style class c t tar sp get cti re view 代码
原文地址:http://www.cnblogs.com/sanjianghuiliu/p/3701062.html