frame和bounds区别

Which  to use?

-Usually depends on the context

 

If you are using a view, typically you use frame

If you are implementing a view,typically you use bounds

Matter of perspective

-From outside it's usually the frame

-From inside it's usually the bounds

 

Examples:

-Creating a view,positioning a view in superview - use frame

-Handing events,drawing a view - use bounds

posted @ 2013-02-20 01:21  cateatmycode  阅读(217)  评论(0编辑  收藏  举报