1 iOS 导航栏导致scrollView类视图自动便宜问题
(iOS 11 导航栏 automaticallyAdjustsScrollViewInsets 无效)
需要在viewDidLoad添加一下代码
if (@available(iOS 11.0, *)) {
self.backTableView.contentInsetAdjustmentBehavior = UIScrollViewContentInsetAdjustmentNever;
} else {
self.automaticallyAdjustsScrollViewInsets = NO;
}
2 UITextField 快速设置边框颜色
textField.borderStyle = UITextBorderStyleNone;
textField.layer.borderWidth= 1.0;
textField.layer.borderColor= [UIColor lightGrayColor].CGColor;










网友评论