Error msg in IB: "clipped by its superview"

Discussion in 'iOS Programming' started by StevenHu, Feb 22, 2010.

  1. StevenHu macrumors member

    Sep 3, 2009
    Southern CA
    In my UIView is a UIScrollView containing several controls so that they extend below the view and must be scrolled to see the lower ones. That's fine.

    But in IB, when I select the View Mode's middle icon and click on Scroll View then on the Info button, I get for the scroll view:
    Type: Illegal Geometry
    Issue: This view is clipped by its subview.

    I'm not sure what I should change, if anything.

  2. drf1229 macrumors regular


    Jun 22, 2009
    That just means the lower controls won't appear on the screen at first.
  3. StevenHu thread starter macrumors member

    Sep 3, 2009
    Southern CA
  4. PhoneyDeveloper macrumors 68040


    Sep 2, 2008
    Right. It means that a subview extends outside its superview's frame. Which I guess you knew.

    If you want you make your view that goes inside your scrollview a top level view in your nib and then addSubview in your view controller's viewDidLoad method. This might make it more convenient to edit the content of the view that is bigger than the scrollview.

    Up to you.

Share This Page