I made the scroll view with lots of text fields in it. I added the updated TPKeyBoardAvoidingScrollView and added it in the scroll view's file owner. I added the outlet in .h file, synthesized in .m file and added the line [self.view addSubview:scrollObject];
The issue is the view starts scrolling only after keyboard appears. It does not scroll as soon as the view is loaded.
Any solution for this?
Adding these lines did not solve my query
scrollViewObj = [[UIScrollView alloc] init];
self.automaticallyAdjustsScrollViewInsets = NO;
[scrollViewObj setScrollEnabled:YES];
scrollViewObj.maximumZoomScale = 4.0;
scrollViewObj.minimumZoomScale = 0.75;
scrollViewObj.clipsToBounds = YES;
I fixed this problem by adding the following at the end of viewDidLoad:
scrollViewObj.contentInset = UIEdgeInsetsMake(0, 0, self.view.bounds.size.height * 2, 0);
The order of the parameters are top, left, bottom, right. Experimenting indicates that the bottom edge inset must be set to a value more than the height of the content. The other edge insets work best if set to 0.
do you have :
also how do you adding those lot of textFields into? (programmatically/storyboard)?