标签: ios uikit
我正在创建一个UIInputView子类。 allowsSelfSizing的文档说
UIInputView
allowsSelfSizing
当此属性的值为false(默认值)时,UIKit 根据输入视图的当前值确定输入视图的大小 布局。当此属性的值为true时,UIKit会尊重该属性 输入的systemLayoutSizeFitting(_ :)方法返回的值 图。
所以我在allowsSelfSizing = true中设置了init,但从未调用systemLayoutSizeFitting(_:)。任何想法为什么会这样?
allowsSelfSizing = true
init
systemLayoutSizeFitting(_:)