ViewUtils is a collection of category methods designed that extend UIView with all the handy little properties and functionality that you always wished were built-in to begin with.
Hi, I think there is a problem with 64 bit iPhone 5s platform. It crashes like saying Unrecognized selector sent to instance [uibutton top] as en example. What could be the problem?
(UIView *)viewOfClass:(Class)class;
class is a keyword in C++, which cause the compile error when C++ is enabled.
class should be renamed to _class or something else.
Can we add nullability annotations? I'm specifically thinking of firstViewController, which can return null at unexpected times and has definitely caused crashes in our production app. Example: calling from a UITableViewCell that just scrolled offscreen.
Apple's documentation recommends using a prefix or suffix on all category methods to avoid unknowingly clashing with an existing or future method implementation by the framework that shares the same name.
ViewUtils should add a prefix or suffix to avoid this problem. More reading: