Demystifying a UIView’s bounds property

True or false ?

self.bounds is basically self.frame with the origin set to 0.

False actually.

By default, the origin of self.bounds is set to CGPointZero, but actually you can animate self.bounds. Think of self.bounds.origin as a contentOffset value.

Or you could read Apple’s documentation about how a UIView’s CALayer relates to the UIView’s properties.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s