(1) Uiscrollview can be used to display more than one screen of content, beyond the screen range of content can be viewed by swiping.
(2) Common properties:
@property (nonatomic) Cgpoint contentoffset; Uiscrollview Current Scroll position
@property (nonatomic) cgsize contentsize; Set Content size Size
@property (nonatomic) uiedgeinsets contentinset; can increase scrolling range in four weeks
@property (nonatomic,getter=isscrollenabled) BOOL scrollenabled; Whether you can scroll
@property (nonatomic) BOOL bounces; Does it have a spring effect?
@property (nonatomic) BOOL showshorizontalscrollindicator; Whether to show horizontal scroll bars
@property (nonatomic) BOOL showsverticalscrollindicator; Whether to show vertical scroll bars
@property (nonatomic) Uiscrollviewindicatorstyle Indicatorstyle; Set scroll bar style
@property (nonatomic,readonly,getter=isdragging) BOOL dragging; Are you being dragged
@property (nonatomic,readonly,getter=istracking) BOOL tracking; Touch has not been dragged to Yes, otherwise no
@property (nonatomic,readonly,getter=isdecelerating) BOOL decelerating; Are you slowing down?
@property (nonatomic,readonly,getter=iszooming) BOOL zooming; Whether you are scaling
@property (nonatomic,getter=ispagingenabled) BOOL pagingenabled; Can I set the paging effect
(3) Gesture scaling: First set object as agent for <UIScrollViewDelegate>
@property (nonatomic) cgfloat Minimumzoomscale; Minimum scale to shrink
@property (nonatomic) cgfloat Maximumzoomscale; Maximum scale of magnification
(4) In the method of invocation, the more important method is
-(void) scrollviewwillenddragging: (Uiscrollview *) scrollviewwithvelocity: (Cgpoint) Velocitytargetcontentoffset: ( Inoutcgpoint *) Targetcontentoffset
{
NSLog (@ "%f", Targetcontentoffset->x)//can print offset in x direction
}
(5) Pinch gesture zooms out and returns to view
-(uiview*) Viewforzoominginscrollview: (Uiscrollview *) ScrollView
{
UIView *imageview = [scrollviewviewwithtag:1000]; Set the tag value of the picture as the pass parameter condition
Returnimageview;
}
UI Grooming-----Part4--uiscrollview