TangramKit icon indicating copy to clipboard operation
TangramKit copied to clipboard

topLayoutGuide 在iOS 11以后被废弃

Open wenjing0628 opened this issue 8 months ago • 1 comments

action1Layout.tg_top.equal(self.topLayoutGuide) 这个方法会报一个提醒 'topLayoutGuide' was deprecated in iOS 11.0: Use view.safeAreaLayoutGuide.topAnchor instead of topLayoutGuide.bottomAnchor

填写上 view.safeAreaLayoutGuide.topAnchor 又不行。 总结 :topLayoutGuide 在iOS 11 以后,没有替代方案

wenjing0628 avatar Apr 28 '25 09:04 wenjing0628

有的,你可以用:TGLayoutPos.tg_safeAreaMargin 来代替。

youngsoft avatar May 03 '25 15:05 youngsoft