Reputation: 8944
I have made a ui in which i am showing some textfileds.I have added all textfields inside a mainview & added mainview under scrollview.But main view is always taking space from top.I have added
self.automaticallyAdjustsScrollViewInsets = NO;
in scroll view .But that make scroll view static. Then the scroll view does not scroll.I am changing the contentSize of scrollview on when keyboard appears & disappears.
Upvotes: 1
Views: 114
Reputation: 961
You can try :
Select ViewContoller in storyboard check a property in attribute Inspector "Adjust Scroll View Insets" untick that,in my case it worked .
Upvotes: 2
Reputation: 7602
Check you have not set properly constrain to your content view.
You have set height and width equal to scrollview but you need to set it respected to your Mainview.
Please set your constrain in this way. and Run your Viewcontroller again
Upvotes: 1