On 5 Apr '08, at 4:47 PM, Lincoln Green wrote:

        [secondView setFrame:[firstView frame]];

This should be
        [secondView setFrame:[firstView bounds]];

The frame is the view's rectangle in its parent's coordinate system; the bounds is its rect in its own coordinates. So secondView's frame is in firstView's coords, and if you want it to fill firstView you need to specify that rect in firstView's coords, which is its bounds.

(Another tip: Typically a view's bounds always start at (0,0), unless you've scrolled the view. And you almost never need to call setBounds: — you'd only do that if you need to scroll or scale the view. To move or resize it, use setFrame:.)

—Jens

Attachment: smime.p7s
Description: S/MIME cryptographic signature

_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to