添加左侧右侧button
UIButton *btn = [[UIButton alloc] initWithFrame:CGRectMake(0, 0, 44, 44)];
[btn addTarget:self action:@selector(myBtn:) forControlEvents:UIControlEventTouchUpInside];
[btn setImage:[UIImage imageNamed:@"mx_btn_back_phone" ] forState:UIControlStateNormal];
[btn setImage:[UIImage imageNamed:@"mx_btn_back_phone" ] forState:UIControlStateHighlighted];
btn.imageEdgeInsets = UIEdgeInsetsMake(0, -31, 0, 0);
UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithCustomView:btn];
self.navigationItem.leftBarButtonItem = backItem;
self.navigationItem.rightBarButtonItem = backItem;
随手笔记整理下!
✧(≖ ◡ ≖✿)
网友评论