Iosui-uiscrollview Properties, Methods Daquan

Source: Internet
Author: User

Property Action Cgpoint contentoffset monitor the current scrolling position cgsize contentsize Scroll range size uiedgeinsets contentinset view in ScrollView The locationID<UIScrollerViewDelegate>Delegatesets the protocol bool directionallockenabled Specifies whether the control can scroll only in one Direction bool bounces controls whether the control encounters a rebound bool alwaysbouncevertical control Vertical direction encountered whether the bounding box bounces bool alwaysbouncehorizontal control horizontal direction encountered whether the border bounces bool pagingenabled control whether the full page flip bool scrollenabled control whether the control can be rolled dynamic BOOL Showshorizontalscrollindicator Controls whether horizontal scroll bars are displayed Boolshowsverticalscrollindicator controls whether vertical scroll bars are displayed uiedgeinsets SCR Ollindicatorinsets Specifies the position of the scrollbar in Scrollerview Uiscrollviewindicatorstyleindicatorstyle set the style of the scroll barfloatdecelerationrate Change Scrollerview position bool Tracking monitor whether the current target is being tracked bool dragging monitor whether the current target is being dragged bool Decelerat ING monitors whether the current target is slowing down bool delayscontenttouches control view whether the deferred call starts scrolling method bool Cancancelcontenttouches Controls whether the control touches the cancel touch event floatminimum scale of minimumzoomscale reductionfloatmaximum scale of maximumzoomscale magnificationfloatZoomscale Set Change proportional bool Bounceszoom controls whether the zoom will rebound bool zooming determine whether the size of the control is changing bool zoombouncing determine if scaling is in progress BOOL scrollstotop control controls scroll to top
Method//as long as it scrolls, it triggers.- (void) Scrollviewdidscroll: (Uiscrollview *) ScrollView; {NSLog (@"contentoffset x is%f,yis%f", Scrollview.contentoffset.x,scrollview.contentoffset.y);}//start dragging the view- (void) Scrollviewwillbegindragging: (Uiscrollview *) ScrollView; {NSLog (@"scrollviewwillbegindragging");}//complete the drag and drop- (void) Scrollviewdidenddragging: (Uiscrollview *) ScrollView willdecelerate: (BOOL) decelerate; {NSLog (@"scrollviewdidenddragging");}//will begin to decelerate when- (void) Scrollviewwillbegindecelerating: (Uiscrollview *) ScrollView; {NSLog (@"scrollviewwillbegindecelerating");}//the deceleration stops when executed, the hand touches when the execution- (void) Scrollviewdidenddecelerating: (Uiscrollview *) ScrollView; {NSLog (@"scrollviewdidenddecelerating");}//The scrolling animation is executed when it is stopped and triggered when the code changes, i.e. when the Setcontentoffset changes- (void) Scrollviewdidendscrollinganimation: (Uiscrollview *) ScrollView; {NSLog (@"scrollviewdidendscrollinganimation");}//set a zoomed-in view, if Uiscrollview's Subview-(UIView *) Viewforzoominginscrollview: (Uiscrollview *) ScrollView; {NSLog (@"Viewforzoominginscrollview"); returnViewa;}//call when zoom Out is complete- (void) Scrollviewdidendzooming: (Uiscrollview *) ScrollView Withview: (UIView *) View Atscale: (float) scale; {Viewa.frame=cgrectmake ( -,0, -, -); NSLog (@"between minimum and maximum when zoomed in, called after any ' bounce ' animation");}//If you are not completely scrolling to the top of the scroll view, you can tap the status bar, and that visual scroll view will always be scrolled to the top, which is the default behavior that you can use to return no to close it-(BOOL) Scrollviewshouldscrolltotop: (Uiscrollview *) ScrollView; {   returnYES;}//roll to the top to trigger the method- (void) Scrollviewdidscrolltotop: (Uiscrollview *) ScrollView; {NSLog (@"Scrollviewdidscrolltotop");}

Iosui-uiscrollview property, Method Daquan

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.