<span id="Label3"></p><p><p>Original blog, reproduced please indicate the source<br>Blog.csnd.net/hello_hwc<br>Welcome to my iOS SDK column<br>Http://blog.csdn.net/column/details/huangwenchen-ios-sdk.html</p></p><p><p>As Xcode becomes more and more perfect, using IB to create some interfaces is a necessary trend. The advantages are obvious, simple and intuitive, able to preview, high efficiency, good debug, especially for some of the complex controls in the view, such as what I wrote today is almost 10 textfield,15 label, and other more than 10 view. If the code autolayout, but also can do (with the visual language will reduce some of the amount of code), I am estimated that the head will explode, estimate the future maintenance of this long layout code, it will be dozens.</p></p><p><p>By the way, there is one more thing: do not think that the pure code is very tall, very dick.</p></p><p><p>Here's A step-by-step tutorial on how to implement</p></p> <blockquote> <blockquote> <blockquote> <p>Note that this article does not support screen rotation</p> </blockquote> </blockquote> </blockquote> <ol> <ol> <li><p>Create a new project, the language is arbitrary, because we only use ib, for convenience, we choose, this size class, that is, the corresponding all the iphone<br><br>Then change the size to 400*100 to make it easier for us to do more control layout<br></p></li> <li><p>Drag ScrollView to fill the screen, add these 4 constraints to<br></p></li> <li><p>Drag a uiview as a containview, let this view to define ScrollView contentsize size, here the 6 constraints one cannot be less<br>This defines Scrollview's contentsize as the width of the screen, as well as the height 1000</p></li> </ol> </ol><p><p></p></p><p><p>here, It can be created like normal auto layout, and the department below the screen responds to various events<br>The core constraints are as follows<br></p></p><p><p>And then I'm adding some view and constraints that I normally use, and the final effect<br>, (gif can't get up, wear two static pictures Ok)<br></p></p>Demo download<p><p>CSDN Download<br>http://download.csdn.net/detail/hello_hwc/8903617</p></p> <p style="font-size:12px;"><p style="font-size:12px;">Copyright Notice: This article is for bloggers original article, If you need to reprint please indicate the source</p></p> <p><p>AutoLayout (pure Ib) in IOS ScrollView</p></p></span>
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.
A Free Trial That Lets You Build Big!
Start building with 50+ products and up to 12 months usage for Elastic Compute Service