Aaaaaahhhh!

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

  1. nashyo, Jan 12, 2012
    Last edited: Jan 12, 2012

    nashyo macrumors 6502

    nashyo

    Joined:
    Oct 1, 2010
    Location:
    Bristol
    #1
    I have set up a new project. I have taken the basic concepts that I've learned from the previous project and applied it to the new project. Now scroll view isn't working.

    The pic below shows the size inspector of scroll view. It matches the previous project I run EXACTLY, yet the scroll view won't scroll.

    [​IMG]

    I have scroll view enabled in the scrollview attributes inspector.

    [​IMG]

    In the size attributes inspector, if I change the view Y axis value to -200 , i can see further down the scroll view in storyboard, where I have buttons and labels set. If I run my app at this point, the area displayed in the app is fixed at y -200. It doesn't scroll! All the labels fill with my content as expected.

    My previous project behaved as expected in my previous project and all the settings match the same. I have literally put them side by side. Why won't it scroll.

    My hair is turning gray because of this! Please help. I &*^ing hate scroll view!

    ----------

    For some reason, setting the content insets and the view height to 800 is wrong. Scroll view works when I set this to 600. Any idea why this is?

    AAAAAAANnnnnnd now its not working again. Baffled. Absolutely baffled.
     
  2. ppilone macrumors 6502

    Joined:
    Jan 20, 2008
    #2
    I can't help too much because your pictures are not loading but have you set the contentSize property of the scroll view to be greater than it's bounds? Without adjusting the contentSize the scroll view won't know that it needs to scroll.
     
  3. KnightWRX macrumors Pentium

    KnightWRX

    Joined:
    Jan 28, 2009
    Location:
    Quebec, Canada
    #3
    It is common courtesy to use a descriptive thread title so that people clicking on your thread know in advance what it is going to be discussing.
     
  4. nashyo thread starter macrumors 6502

    nashyo

    Joined:
    Oct 1, 2010
    Location:
    Bristol
    #4
    Nearly quitting

    Shame the pictures not loading. It shows the content size is set appropriately. No idea why this is happening. Spend 5 hours on it now. It's really important to me that I get this done. But after this I Might just put my hands up and walk away from this.
     
  5. KnightWRX macrumors Pentium

    KnightWRX

    Joined:
    Jan 28, 2009
    Location:
    Quebec, Canada
    #5
    Your pictures aren't loading because you used the imageshack.us Link rather than Direct Link.

    Just edit your post and change your tags.

    And please change the thread title to something more descriptive like "Problem with scrollview" or something.
     
  6. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #6
    What shows?
     
  7. KnightWRX macrumors Pentium

    KnightWRX

    Joined:
    Jan 28, 2009
    Location:
    Quebec, Canada
    #7
    His screenshots badly linked from imgshack :

    Code:
    The pic below shows the size inspector of scroll view. It matches the previous project I run EXACTLY, yet the scroll view won't scroll.
    <br>
    <br>
    <img border="0" alt="" src="http://imageshack.us/photo/my-images/843/screenshot20120112at152.png/">
    <br>
    <br>
    I have scroll view enabled in the scrollview attributes inspector.
    <br>
    <br>
    <img border="0" alt="" src="http://imageshack.us/photo/my-images/827/screenshot20120112at153.png/">
     
  8. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #8
    contentSize can't be set using Interface Builder.
     
  9. nashyo thread starter macrumors 6502

    nashyo

    Joined:
    Oct 1, 2010
    Location:
    Bristol
    #9
    All fine now

    I've done it now. The view and the content size need to differ.

    I wasn't using interface builder, I was using storyboard.

    Storyboard is simple, but finding out how to use it is so hard.

    Thanks
    Rob
     
  10. xStep macrumors 68000

    Joined:
    Jan 28, 2003
    Location:
    Less lost in L.A.
    #10
    EDIT: See you solved your problem.


    In case it is still useful, here are your images.

    [​IMG]


    [​IMG]


    I ripped out the IMG tag from the Widget link under 'Embed this image'. I think that represents the 'Direct Link' under 'Links to share this image'.
     
  11. dejo Moderator

    dejo

    Staff Member

    Joined:
    Sep 2, 2004
    Location:
    The Centennial State
    #11
    When you're editing a Storyboard, you're still using Interface Builder, albeit in a newer, integrated way. That is, Interface Builder is no longer a separate app but "cooked into" Xcode.
     
  12. nashyo thread starter macrumors 6502

    nashyo

    Joined:
    Oct 1, 2010
    Location:
    Bristol

Share This Page