2018-06-14

2018-06-14  本文已影响14人  问问问你

    [self.iTableView registerNib:[UINib nibWithNibName:NSStringFromClass([LBbankCheckTableViewCell class]) bundle:nil] forCellReuseIdentifier:NSStringFromClass([LBbankCheckTableViewCell class])];

      LBOrderTableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:NSStringFromClass([LBOrderTableViewCell class]) forIndexPath:indexPath];

        cell.selectionStyle = UITableViewCellSelectionStyleNone;

+ (instancetype)controller

{

    return [[UIStoryboard storyboardWithName:NSStringFromClass(self) bundle:nil] instantiateInitialViewController];

}

-(void)setLeftNavgationBarItem

{

    //左边按钮

    UIButton *backButton = [UIButton buttonWithType:UIButtonTypeCustom];

    backButton.frame=CGRectMake(0,0,30,32);

    backButton.highlighted=false;

    backButton.backgroundColor = [UIColor clearColor];

    [backButtonaddTarget:self action:@selector(backButtonClick) forControlEvents:UIControlEventTouchUpInside];

    [backButtonsetImage:[UIImage imageNamed:@"icon_left"] forState:UIControlStateNormal];

    [backButtonsetImage:[UIImage imageNamed:@"icon_left"] forState:UIControlStateHighlighted];

    UIBarButtonItem *backItem = [[UIBarButtonItem alloc] initWithCustomView:backButton];

    UIBarButtonItem *negativeSpacer = [[UIBarButtonItem alloc] initWithBarButtonSystemItem: UIBarButtonSystemItemFixedSpace target:nil action:nil];

    negativeSpacer.width= -7;

    self.navigationItem.leftBarButtonItems=@[negativeSpacer, backItem];

}

-(void)backButtonClick

{

    [self.navigationController popViewControllerAnimated:YES];

}

上一篇下一篇

猜你喜欢

热点阅读