I was wrestling with UIScrollview and it knocked me out. I tried to take reference from following two post on stackOverFlow
scrollview xcode4.5 autolayout, Xcode 4.5 UIScrollView, Embed ImageView in ScrollView with Auto Layout on iOS 6,
I tried viewDidLayoutSubviews, as told in UIScrollView setContentSize breaks view with Auto Layout that is causing my app to crash.
And I tried ViewDidLoad, viewDidAppear and viewWillAppear but nothing worked. I tried google and found couple more related post https://coderwall.com/p/zfe8da, http://www.devx.com/wireless/Article/45113
I tried to rethink and didnt find anything fancy that I was not doing. It seems simple, straight approach.
I am out of clues or any guess please help me.
I am using following code, just to mentioned I have 3 images that I have put in the ScrollView. I have stack them on top of each other so there height is more than iPhone screen height. I was expecting it I set them just scroll simple, but guess I was wrong. In Implementation file
_howtoScrollView.frame = CGRectMake(0, 0, 320, 460);
_howtoScrollView.scrollEnabled = YES;
[self.howtoScrollView setContentSize:CGSizeMake(self.howtoScrollView.frame.size.width, 700)];
[self.view addSubview:_howtoScrollView];
In interface file .h
@property (weak, nonatomic) IBOutlet UIScrollView *howtoScrollView;
Anyone who got success with ScrollView while having StoryBoard Autolayout.