The use of iOS development Uiscrollview

Source: Internet
Author: User
iOS Development Uiscrollview Usage (1) Common properties:

1) @property (nonatomic) Cgpointcontentoffset; This property is used to display uiscrollview scrolling position
2) @property (nonatomic) cgsizecontentsize; This property is used to gauge the contents of Uiscrollview, and the rolling range (how far can I roll)?
3) @property (nonatomic) Uiedgeinsetscontentinset; This property is capable of adding additional scrolling areas for 4 weeks of Uiscrollview

(2) Other properties:

1) @property (nonatomic) BOOL bounces; Set Uiscrollview If spring effect is required
2) @property (nonatomic,getter=isscrollenabled) boolscrollenabled; Sets whether Uiscrollview can scroll
3) @property (nonatomic) BOOL showshorizontalscrollindicator; Do you have a display? Horizontal scroll bar
4) @property (nonatomic) BOOL showsverticalscrollindicator; Do you want to show the vertical scroll bar?

(3). Attention Point

• If Uiscrollview cannot scroll, the following may be the reason:

(1) No setup contentsize

(2) scrollenabled = NO

(3) No Touch event Received: userinteractionenabled = no

(4) No cancellation of AutoLayout function (if you want to scrollview scrolling, you must cancel AutoLayout)

The use of iOS development Uiscrollview

Related Article

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: 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.