William X
William X

Reputation: 7021

Why does the UIScrollView could not be scrolled in the iOS simulator?

I'm trying to get familiar with the UIScrollView. I try to set the UIScrollView's contentSizeto full width of the screen and ten times the height of the screen in the corresponding ViewController's viewDidLoad method. However, when I tried to run it on the iOS simulator, I found that the view can't be scrolled. Please kindly help to give some hints & opinion.

Thanks!

Upvotes: 1

Views: 1407

Answers (1)

Mohammad Kamar Shad
Mohammad Kamar Shad

Reputation: 6067

You need To check in your Code See

1)Check whether the UserInteraction enabled For The UIScrollView if not Please Do as

     [theScrollView setUserInteractionEnabled:YES];

EDIT

2)Please Make Sure You have Enabled The Scrolling of UIScrollView

     theScrollView.scrollEnabled = YES;

Thanks.

Upvotes: 1

Related Questions