Having trouble getting UIView sizeToFit to do anything meaningful

The documentation is pretty clear on this. -sizeToFit pretty much calls -sizeThatFits: (probably with the view’s current size as the argument), and the default implementation of -sizeThatFits: does almost nothing (it just returns its argument).

Some UIView subclasses override -sizeThatFits: to do something more useful (e.g. UILabel). If you want any other functionality (such as resizing a view to fit its subviews), you should subclass UIView and override -sizeThatFits:.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)