What does it mean to call initWithFrame on a UIView class or subclass with CGRectZero?
问题 I have seen code that calls initWithFrame of a UIView subclass (such as UILabel ) with CGRectZero and things seem to work fine. What does it mean to instantiate a UIView subclass with a 2D point (which seems to be what CGRectZero is)? 回答1: It just means that you're instantiating the view without an initial value for its frame. This is done, for instance, when you want to create an instance of the view object and do not need to place it into the view hierarchy right away. Deciding upon and