Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

CPSplitView indents its subviews by frame.origin

#106

When placing a CPSplitView in a window, all subviews added to it gets indented by the value of the SplitView's origin.x, and the first subview gets indented by origin.y.

Here's the code that sets up the splitView. topView and bottomView are CPTextField instances. Attached is a screenshot of what happens.

var splitView = [[CPSplitView alloc] initWithFrame:CGRectMake(250,0, CPRectGetWidth([contentView frame]) - 250, CPRectGetHeight([contentView frame]))];

[splitView setAutoresizingMask:CPViewHeightSizable | CPViewWidthSizable];

[splitView setVertical:NO];

[splitView addSubview:topView];
[splitView addSubview:bottomView];

Reported by Daniel Kennett · October 13th, 2008 @ 06:36 AM

State: resolved
Milestone: 0.6
Assigned to: Francisco Tolmasky Francisco Tolmasky

Activity

  1. Francisco Tolmasky
    Francisco Tolmasky

    Just so I understand correctly, does this mean that as you move the parent split view to the right, so too its inner views move?

    October 14th, 2008 @ 06:38 AM

  2. Daniel Kennett
    Daniel Kennett

    Yes - the further in the SplitView is moved, the larger the indent.

    October 14th, 2008 @ 06:41 AM

  3. Francisco Tolmasky
    Francisco Tolmasky

    Could you upload a full runnable test case, I'm having trouble reproducing this.

    October 14th, 2008 @ 07:58 PM

  4. Daniel Kennett
  5. admin (at 280north)
    admin (at 280north)
    • State changed from new to resolved

    (from [0ac0a84b18feba19ad0b0451831b6329c163f1e0]) Fix for CPSplitView indents its subviews by frame.origin.

    [#106 CPSplitView indents its subviews by frame.origin state:resolved]

    Reviewed by me. http://github.com/280north/cappu...

    October 16th, 2008 @ 02:40 AM

  6. Francisco Tolmasky
    Francisco Tolmasky
    • Assigned user set to Francisco Tolmasky
    • State changed from resolved to new
    • Milestone set to 0.6

    October 16th, 2008 @ 02:41 AM

  7. Francisco Tolmasky
    Francisco Tolmasky

    Excellent, thanks.

    Fixed in TOT. Sorry about that, the perils of always putting everything at 0,0.

    October 16th, 2008 @ 02:41 AM

  8. Francisco Tolmasky
    Francisco Tolmasky
    • State changed from new to resolved

    October 16th, 2008 @ 02:42 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.