[UIImageView centerXAnchor]的最低IOS版本是多少?

时间:2016-01-13 10:31:46

标签: ios uiimageview autolayout

有人可以告诉我[UIImageView centerXAnchor]的最低IOS版本是什么,我一直在环顾四周,无法找到相关信息。在IOS 8.1上进行测试时,我一直收到以下错误。

-[UIImageView centerXAnchor]: unrecognized selector sent to instance 0x7ab46b10

3 个答案:

答案 0 :(得分:3)

适用于iOS 9及更高版本。

为了将来参考,您可以通过方法名称上的选项+左键单击进行检查。

enter image description here

答案 1 :(得分:1)

答案 2 :(得分:1)

这是苹果定义@property(readonly, strong) NSLayoutXAxisAnchor *centerXAnchor NS_AVAILABLE_IOS(9_0);,它意味着在iOS 9.0及更高版本中可用。 希望它有所帮助。