大醉和尚  
qq:3262641915,如有问题,欢迎讨论.

参考:http://kisscu.com/2018/07/01/%E9%80%82%E9%85%8Dios-11%E6%80%BB%E7%BB%93/

  • self.navigationItem.rightBarButtonItem = leftItem;

 

if (@available(iOS 11, *)) {
        [leftItem.customView.heightAnchor constraintEqualToConstant:30].active = YES;
        [leftItem.customView.widthAnchor constraintEqualToConstant:30].active = YES;
    }

  

  • viewcontroller frame 约束

- (void)viewWillLayoutSubviews {
    [super viewWillLayoutSubviews];
    [_moduleView.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
        make.edges.equalTo(self.view);
        if (@available(iOS 11.0, *)) {
            make.bottom.equalTo(self.view.mas_safeAreaLayoutGuideBottom);
        }
        IQLog(@"make:%@", make.size);
    }];
}

  

 

posted on 2018-09-19 15:56  大醉和尚  阅读(125)  评论(0编辑  收藏  举报