Cocoa: What's the difference between the frame and the bounds?

后端 未结 11 2367
温柔的废话
温柔的废话 2020-11-22 08:00

UIView and its subclasses all have the properties frame and bounds. What\'s the difference?

11条回答
  •  没有蜡笔的小新
    2020-11-22 08:18

    Frame its relative to its SuperView whereas Bounds relative to its NSView.

    Example:X=40,Y=60.Also contains 3 Views.This Diagram shows you clear idea.

    FRAME

    BOUNDS

提交回复
热议问题