美文网首页
2018-06-14

2018-06-14

作者: 问问问你 | 来源:发表于2018-06-14 10:33 被阅读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];

    }

    相关文章

      网友评论

          本文标题:2018-06-14

          本文链接:https://www.haomeiwen.com/subject/chieeftx.html