// // PictureStoryViewController.m // redstar // // Created by admin on 15/11/16. // Copyright © 2015年 ZWF. All rights reserved. // #import "PictureStoryViewController.h" @interface PictureStoryViewController () @end @implementation PictureStoryViewController - (void)viewWillAppear:(BOOL)animated { [super viewWillAppear:animated]; self.navigationController.navigationBar.hidden = NO; } - (void)viewDidLoad { [super viewDidLoad]; self.view.backgroundColor = [UIColor whiteColor]; [self setupNav]; } #pragma mark - Private Methods - (void)setupNav { UILabel *customLab = [[UILabel alloc] initWithFrame:CGRectMake(0, 0, 40, 30)]; [customLab setTextColor:[UIColor whiteColor]]; [customLab setText:@"图说口碑"]; customLab.font = [UIFont boldSystemFontOfSize:19]; self.navigationItem.titleView = customLab; UIButton *backBtn = [UIButton buttonWithType:UIButtonTypeCustom]; backBtn.frame = CGRectMake(0, 0, 30, 44); [backBtn setImage:[UIImage imageNamed:@"back_btn"] forState:UIControlStateNormal]; [backBtn addTarget:self action:@selector(doBack:) forControlEvents:UIControlEventTouchUpInside]; UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithCustomView:backBtn]; self.navigationItem.leftBarButtonItem = backItem; } -(void)doBack:(id)sender { [self.navigationController dismissViewControllerAnimated:YES completion:nil]; } - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. } /* #pragma mark - Navigation // In a storyboard-based application, you will often want to do a little preparation before navigation - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { // Get the new view controller using [segue destinationViewController]. // Pass the selected object to the new view controller. } */ @end