The Scrollview has several main properties:
contentsize: The size of the content view in ScrollView, which returns the Cgsize struct type, containing the width and height2 members;
Contentinset: used to add a border around the content view in ScrollView, often to leave blank space to place the Toolbar tab bar or navigation bar
Contentoffset: content View coordinates origin rain ScrollView coordinates origin offset, return cgsize struct type
@implementation viewcontroller-(void) viewdidload{ [Super Viewdidload];self.scrollview.contentsize = Cgsizemake (320, 600);} -(void) Viewdidappear: (BOOL) animated{ [Self.scrollview setcontentoffset:cgpointmake (0, +) Animated:yes]; Self.scrollView.contentOffset = Cgpointmake (0, +); NSLog (@ "Self.scrollView.contentSize%f,%f", Self.scrollView.contentSize.height, Self.scrollView.contentSize.width ); [Super Viewdidappear:yes]; }
Onscreen scrolling controls ScrollView