提供一种定制navigationBar返回按钮的方法

    UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom];
    backButton.frame = CGRectMake(0, self.navigationController.navigationBar.frame.size.height/2-22, 38, 38);
    [backButton addTarget:self action:@selector(navBarLeftButtonDetail) forControlEvents:UIControlEventTouchUpInside];
    [backButton setImage:[UIImage imageNamed:@"back_btn"] forState:(UIControlStateNormal)];
    [backButton setTintColor:[UIColor whiteColor]];
    UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithCustomView:backButton];
    self.navigationItem.leftBarButtonItem = backItem;

你可能感兴趣的:(提供一种定制navigationBar返回按钮的方法)