Basic use of Uiscrollview:
Uiscrollview 's usage is simple.
Add what you need to show to Uiscrollview
Set the Contentsize property of the Uiscrollview to tell uiscrollview all the dimensions of the content, that is, to tell it the range of scrolling (how far to roll, where to roll to the end)
Common Properties of Uiscrollview:
@property(nonatomic) cgpoint contentoffset;
This property is used to indicate where the Uiscrollview scrolls.
@property(nonatomic) cgsize contentsize;
This property is used to indicate the size of the Uiscrollview content, the scrolling range (how far to roll)
@property (nonatomic) uiedgeinsets contentinset;
This property is capable of Adding additional scrolling areas for 4 weeks of Uiscrollview
@property(nonatomic) BOOL bounces;
Set Uiscrollview If spring effect is required
@property(nonatomic,getter=isscrollenabled) BOOL scrollenabled;
Sets whether Uiscrollview can scroll
@property(nonatomic) BOOL showshorizontalscrollindicator;
Whether to display the horizontal scroll bar
@property(nonatomic) BOOL showsverticalscrollindicator;
Whether to show vertical scroll bars
To implement UIScroll scaling through proxies:
Set id<uiscrollviewdelegate> delegate proxy object for Uiscrollview
Set minimumzoomscale : Minimum scale to zoom out
Set Maximumzoomscale : Maximum scale magnification
Let the proxy object implement the following method to return the view control that needs to be scaled
-(UIView *) Viewforzoominginscrollview: (uiscrollview *) ScrollView;
Other proxy methods related to scaling
Call when Zoom is complete
-(void) scrollviewwillbeginzooming: (uiscrollview *) ScrollView Withview: (UIView *) view
is being scaled when calling the
-(void) Scrollviewdidzoom: (uiscrollview *) scrollView
iOS notes 2