Push Storyboard
按钮事件Push
到最后一个页面。 Back
Button先从Tab Bar
(此时已经隐藏了)的顶部,而后回到底部。 用为代码描述,大概是经历了ios
back.bottomConstraint.constant = -tabbarHeight;
back.bottomConstraint.constant = 0.0f;
复制代码
iOS 10.3.3
Storyboard
布局Back
Button布局Hide Bottom Bar on Push: YES
这里是他们的看法bash
Safe Area
是iOS 11
的特性,对iOS 10
支持得不太好(< iOS 11
估计都有问题),须要作适配。布局
但奇怪的是,我还没发现Safe Area Top
须要适配,显然Safe Area Bottom
须要。ui
底部约束Safe Area
都改为Superview
atom
而后绑定约束为属性,代码适配,代码像这样spa
@interface YourViewController ()
@property (weak, nonatomic) IBOutlet NSLayoutConstraint *bottomConstraint;
@end
@implementation YourViewController
- (void)viewDidLoad {
[super viewDidLoad];
CGFloat bottomValue = 0.0f; // your value
UIEdgeInsets edgeInsets = UIApplication.sharedApplication.keyWindow.layoutMargins;
CGFloat bottomInset = edgeInsets.bottom;
self.bottomConstraint.constant = - bottomInset - bottomValue;
}
@end
复制代码
为啥不用直接Storyboard
适配,由于Storyboard
没办法搞这种适配,多是我没找到,有的话告诉我❤️code