Drawing and UIScrollView

Discussion in 'iOS Programming' started by nashyo, Jan 12, 2012.

  1. nashyo macrumors 6502


    Oct 1, 2010
    Using the new features in Xcode 4.2 is a challenging task, when the community doesn't seem to know very much about it. Hopefully MacRumors can help here.

    Using the view size attributes panel in storyboard, I have a scroll view positioned (0,0) and sized width:320, height:659.

    Using the scroll view size attributes panel in storyboard, I have content insets set at Top:0 Bottom:659 Left:0 Right:0. Scroller insets are set at 0 for top bottom left and right.

    Autosizing is switch on for all dimensions in both the view and the scroll view - not that I really know what this is doing...

    I have been adjusting these figures, tweaking them up or down and I can't get the scrolling to work just how I need it to. Please help. How should i have these settings configured?

  2. PhoneyDeveloper macrumors 68040


    Sep 2, 2008
    I've hardly used storyboards so I don't have an authoritative answer. But, the contentInsets are probably not relevant to this. They should most likely be all zero. It's the contentSize property of the scrollview that makes it scroll. So it needs to be set to a size that is larger than the frame of the scrollview.

    Without storyboards the only way to set the contentSize is in code, normally in viewDidLoad. I don't know if you can set the contentSize with the storyboard or if it sets this value automatically (which it should always have done but never did).

Share This Page