ios 自定义NavgationBar的按钮

UIImage *btnimage = [UIImage imageNamed:@"about.png"];
UIButton *btn = [[UIButton alloc] initWithFrame:self.navigationController.navigationBar.frame];
btn.showsTouchWhenHighlighted = YES;
[btn addTarget:self action:@selector(infoAction:) forControlEvents:UIControlEventTouchUpInside];
[btn setImage:btnimage forState:UIControlStateNormal]; UIBarButtonItem *rightBtn = [[UIBarButtonItem alloc] initWithCustomView:btn];
[self.navigationItem setRightBarButtonItem:rightBtn];
上一篇:使用.Net Core CLI命令dotnet new创建自定义模板


下一篇:漫谈程序员(十)大白菜装机版安装win7系统使用教程