修改返回按钮问题

This commit is contained in:
xuemh
2018-04-14 09:04:52 +08:00
parent 9f420b050a
commit 4dd95da147
6 changed files with 8 additions and 19 deletions
@@ -21,12 +21,7 @@
}
-(void)setNav{
UIButton *btn = [UIButton buttonWithType:UIButtonTypeCustom];
btn.frame = CGRectMake(2, 5,47, 44);
[btn setBackgroundImage:[UIImage imageNamed:@"back_btn"] forState:UIControlStateNormal];
[btn addTarget: self action: @selector(goBackAction) forControlEvents: UIControlEventTouchUpInside];
UIBarButtonItem*back=[[UIBarButtonItem alloc]initWithCustomView:btn];
UIBarButtonItem*back=[[UIBarButtonItem alloc] initWithImage:[[UIImage imageNamed:@"back_btn"] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal] style:UIBarButtonItemStyleDone target:self action:@selector(goBackAction)];
self.navigationItem.leftBarButtonItem=back;
}
- (void)addTitleViewWithTitle:(NSString *)title{