iOS ScrollView cannot scroll up and down issues

Source: Internet
Author: User

First use ScrollView, found you in nib layout good view, run incredibly can not scroll, please only say that the number of iOS is too lazy.

Find the problem to solve the problem, is to let its rolling must be set ScrollView contentsize, size should be larger than uiscrollview frame, set to scroll inside the content size on it, as follows

[Self.scrollview Setcontentsize:cgsizemake (320, 430)];

Of course ScrollView's scrollenable attribute must be turned on

If you are not so good, then you set the contentsize must be in the Viewdidload method, put in viewwillappear to see it, the problem is resolved

Contact Us

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

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.