1. 設置導航欄返回按鈕:
UIButton * button = [UIButton buttonWithType:UIButtonTypeCustom];
button.frame = CGRectMake(0, 0, 44, 30);
[button setImage:[UIImage imageNamed:@"leftArrow"] forState:UIControlStateNormal];
button.imageView.contentMode = UIViewContentModeScaleAspectFit;
[button addTarget:self action:@selector(DismissViewController:) forControlEvents:UIControlEventTouchUpInside];
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithCustomView:button];
2. 設置導航欄背景圖片:
[self.navigationController.navigationBar setBackgroundImage:[UIImage imageNamed:@"grayNavBack"] forBarMetrics:UIBarMetricsDefault];
3. 取消導航欄橫線:
[self.navigationController.navigationBar setShadowImage:[UIImage new]];