iOS 11.0中不推荐使用’automatedAdjustsScrollViewInsets’
发布时间:2020-12-15 01:51:30 所属栏目:百科 来源:网络整理
导读:我刚刚开始编译到iOS 11,并注意到Apple现在宣布该属性 var automaticallyAdjustsScrollViewInsets: Bool { get set } 被弃用: https://developer.apple.com/documentation/uikit/uiviewcontroller/1621372-automaticallyadjustsscrollviewin 是否有其他属性
我刚刚开始编译到iOS 11,并注意到Apple现在宣布该属性
var automaticallyAdjustsScrollViewInsets: Bool { get set } 被弃用: https://developer.apple.com/documentation/uikit/uiviewcontroller/1621372-automaticallyadjustsscrollviewin 是否有其他属性可以在iOS 11中修复此警??告? 默认值是否保持正确或将来如何处理? 解决方法
此属性的默认值现在为true.如果需要设置它,则需要在将承载viewController的scrollview中设置它并设置其属性contentInsetAdjustmentBehavior.以下是一个例子:
scrollView.contentInsetAdjustmentBehavior = .automatic (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |