Richard Durr
Richard Durr

Reputation: 3261

How does Cappuccino manages to layout views like in Cocoa?

How does the layout support of Cappuccino work? For example the centering and the automatik resizing.

Upvotes: 4

Views: 569

Answers (2)

Ross Boucher
Ross Boucher

Reputation: 702

The autoresizing masks are more or less implemented in this method: http://github.com/280north/cappuccino/blob/master/AppKit/CPView.j#L987

On a more conceptual level, all views in Cappuccino are absolutely positioned. By not relying on the browser to lay things out, we always know exactly where everything is, and can make decisions accordingly.

Upvotes: 4

Are you asking for an explanation on how to use the feature (one good place is this tutorial: http://cappuccino.org/learn/tutorials/automatic-layout/ ), or are you asking how it is implemented?

Upvotes: 3

Related Questions