Need help with Scroll View

Discussion in 'iOS Programming' started by lynkynpark86, Sep 2, 2010.

  1. lynkynpark86 macrumors 6502

    I am making this app. It has 7 separate xibs, one of which has a second view. In that second view, I have a Scroll view. In the view controller.h, i have "IBOutlet UIScrollView *mathFormulasPAScrollView;" in the @interface. In the .m, I have "[mathFormulasPAScrollView setScrollEnabled:YES];" and
    "[mathFormulasPAScrollView setContentSize:CGSizeMake(320, 1000)];" in the viewDidLoad below super viewdidload. I have my scrollview set to 320x1000 in the nib. I have the scroll view connected in the inspector. I don't know why this isn't working, but it just doesn't scroll. If anyone can help me figure this out, please do.
  2. kainjow Moderator emeritus


    Jun 15, 2000
    The scroll view should be smaller then the content size. It should never be greater then the size of the device's screen.
  3. lynkynpark86 thread starter macrumors 6502

    I don't get what you're saying. If a scroll view has to be smaller than the device screen, then why have a scroll view?
  4. PhoneyDeveloper macrumors 68040


    Sep 2, 2008
    Apple has several Scrollview sample code projects. Look at them.
  5. Sykte macrumors regular

    Aug 26, 2010
    Think of it as an assembly line you can only work on so much stuff at one time this would be your view size. However the line may stretch on for miles this would be your content size.

Share This Page