2014-05-04 16 views
2

它总是返回一个NULL而不是属性。为什么无法用class_getProperty获取UIView.frame属性?

objc_property_t property = class_getProperty([UIView class], "frame"); 
XCTAssertTrue(property != NULL, 
       @"UIView.frame property should be here."); 

正常工作与center例如,但frame好像不是。

有人可以解释一下吗?

回答

相关问题