Also make sure to change the size of the View to fill up the entire screen just like the Scroll View. If the View is not indented under the Scroll View, then make sure you dragged the View on top of the Scroll View. If you look at the left pane now, you should see a View object indented under the Scroll View object. Click the View object and drag it over on top of the Scroll View. To start, go to the Object library and search for “UIView”. This View is commonly referred to as the Content View since it stores all of the content that your users will be scrolling through. ![]() Now that you have your Scroll View, you need to put a regular View inside of it to hold all of your content. This is where things start to get interesting. These constraints make sure that your Scroll View fills up the entire screen regardless of the screen size of the device running your application. If you do see all zeros (as it should), then click on each of the I beams so that they turn red and click on the “Add 4 Constraints” button. If you do not see zeros on each of the sides, then go back and make sure that the Scroll View is taking up the entire view. You should see a zero to the top, left, right, and bottom of the square just as it shows in the image above. Next, click on the Pin tool as shown in the image above. Then click on the bottom right corner of the Scroll View and drag it to the bottom right corner of the View Controller so that the Scroll View fills up the entire view. ![]() While the Scroll View is selected, click on the top left hand corner of it and drag it to the top left corner of the View Controller. Now click on the Scroll View object and drag it onto the View Controller. Click in the text field that says “Filter” and type “scroll view”. ![]() At the bottom right hand corner of your screen, you will find the Object library.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |