Whoa, seems it does not have such property indeed, but a method. Documentation shows as a property, but in reality it is a method. https://github.com/JaviSoto/iOS7-Runtime-Headers/blob/master/Frameworks/UIKit.framework/UIView.h
Weird.
Question
It always return a NULL instead of the property.
objc_property_t property = class_getProperty([UIView class], "frame");
XCTAssertTrue(property != NULL,
@"UIView.frame property should be here.");
Works fine with center
for example, but with frame
seems not.
Can anybody explain this?
Solution
Whoa, seems it does not have such property indeed, but a method. Documentation shows as a property, but in reality it is a method. https://github.com/JaviSoto/iOS7-Runtime-Headers/blob/master/Frameworks/UIKit.framework/UIView.h
Weird.