标签:style blog io os ar on 2014 log cti
添加多个按钮,同样可以只添加一个
UIBarButtonItem *anotherButton = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"register", nil) style:UIBarButtonItemStylePlain target:self action:@selector(registerClick:)];
UIBarButtonItem *anotherButton2 = [[UIBarButtonItem alloc] initWithTitle:NSLocalizedString(@"login", nil) style:UIBarButtonItemStylePlain target:self action:@selector(loginClick:)];
[self.navigationItem setRightBarButtonItems:[NSArray arrayWithObjects: anotherButton,anotherButton2,nil]];self.shareNavleftView = [[UIView alloc] init];
self.shareNavleftView.frame = CGRectMake(0.0, 0.0, 191.0, 47.0);
UIImageView *img = [[UIImageView alloc] init];
img.image = [UIImage imageNamed:@"oatosLogo.png"];
img.autoresizingMask = UIViewAutoresizingFlexibleWidth;
img.frame = self.shareNavleftView.frame;
[self.shareNavleftView addSubview:img];
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:self.shareNavleftView];[self.navigationController.view addSubview:self.shareNavleftView];
标签:style blog io os ar on 2014 log cti
原文地址:http://blog.csdn.net/ldl0602/article/details/40581681