Skip to content
kerrishotts edited this page Apr 1, 2013 · 2 revisions

(part of UI.View)

Type: rect

Default: zeroRect

Represents the bounds of the element. Changing the bounds property directly affects the frame of the object, and also sends out boundsDidChange and frameDidChange notifications.

Note: Although you can change this property, most often one will change the frame instead.

Note: changing the properties of the bounds object should be avoided, as it does not utilize the setter method for the property. Therefore notifications will fail to fire and properties that rely on it will fail to be updated. When changing this property, you should always assign a new copy of the object that contains the desired modifications.

Usage

var aView = new UI.View();
aView.bounds = UI.makeRect ( UI.makePoint ( 0, 0), UI.makeSize ( 100, 150 ) );
//aView's bounds are now 100 wide and 150 high

Version

0.3 Introduced; Docs Valid.

Clone this wiki locally