Rai*_*ins 15 autolayout swift ios11
由于topLayoutGuide属性在iOS 11中已弃用,因此使用顶部布局指南的替代方法是什么
?
backView.topAnchor.constraint(equalTo:topLayoutGuide.topAnchor)
Rai*_*ins 23
TopLayoutGuide在iOS的11弃用所以我们选择使用SafeAreaLayoutGuide这样的:
Run Code Online (Sandbox Code Playgroud)let guide = view.safeAreaLayoutGuide
第二个添加约束来指导
searchBackView.topAnchor.constraint(equalTo: guide.topAnchor).isActive = true
Run Code Online (Sandbox Code Playgroud)