I decided to go down and learn every property for the UIView on the Attributes Inspector. Part of the whole "leave nothing misunderstood" quest.
This took a lot of digging to understand this property.
Here are some things I've found out but none of which actually came from Apple:
More Info from Apple
Content Mode
I think most of us know how this applies to the UIImageView control but what about just the UIView?This took a lot of digging to understand this property.
Here are some things I've found out but none of which actually came from Apple:
- For an image view, this is talking about the position/scaling of image.
- For a UIView that draws its content, this is talking about the drawn content.
- Like using UIBezierPath to draw paths.
- It does not affect the layout of subviews inside a UIView.
How is this property beneficial?
- I won't go into how it is beneficial for a UIImageView. Most of you probably already know and if you don't then check out this great article.
- Use this property when drawing a path and then handling how that path is then positioned/scaled when the UIView's bounds or frame changes.
- The idea is to save processing time on redrawing when UIView's bounds change.
More Info from Apple
No comments:
Post a Comment
Note: Only a member of this blog may post a comment.