Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Move everything in a Storyboard view into a scroll view

I have a view (show below) in my storyboard. When I am typing in the stuff on the bottom the keyboard covers up what I am typing. The easiest way (I believe) to solve this would be to put everything in the view in a UIScrollView.

Is there an easy way to move everything in that view into a scroll view? Or if you believe there is a better way to do this what is it?

enter image description here

like image 895
brettfazio Avatar asked Dec 26 '15 14:12

brettfazio


2 Answers

For putting everything in scrollview just select all your views (hold shift and click on every view) and go to editor in toolbar of xcode select option 'Embed In', select scroll view and you are done.

like image 137
Ajay Kumar Avatar answered Sep 18 '22 01:09

Ajay Kumar


To solve this issue I did something slightly similar to @paulvs to move all of the text fields into the scroll view first I made a new view controller and put a scroll view in it. Then I selected all of the text fields using command on the keyboard and copy-pasted them into the scroll view.

Not sure if this is the most elegant way to make sure the user can see the text boxes at the bottom but it seems to have worked to move the text fields.

like image 21
brettfazio Avatar answered Sep 19 '22 01:09

brettfazio