Contentsize belongs to cgsize type, Cgsizemake (width,height), width determines the horizontal distance of Uiscrollview scrolling, height determines the longitudinal distance of Uiscrollview scrolling, Contensize property cannot scroll the view if you do not set a value
Set up a Uiscrollview
Uiscrollview *SV = [[Uiscrollview alloc] initWithFrame:self.view.bounds];
Sv.backgroundcolor = [Uicolor Cyancolor];
[Self.view ADDSUBVIEW:SV];
Add a View
UIImage *image = [UIImage imagenamed:@ "big picture"];
Uiimageview *iv = [[Uiimageview alloc] initwithimage:image];
[SV Addsubview:iv];
Sv.contentsize = iv.bounds.size;
The added view will be larger in general resolution
Contentoffset the position of the content view offset, is the Cgpoint type, Cgpointmake (x, y), the default is Cgpointzero<==>cgpointmake (0,0), It means that the content view is relative to the view origin, the offset position, left and right scrolling, will change the value of x, scroll up and down will change the value of Y, this is in the calculation of Uiscrollview and its sub-class Uicollectionview view width or high time, very effective, Depending on the amount of x or Y offset, it is easy to calculate the height or width of each view.
Contentinset the margin around the view, Uiedgeinsets type Uiedgeinsetsmake (top,left,bottom,right); The margin around the distance, is to add a border to the view, size customization.
The knowledge is very small white, is oneself reviews some knowledge, the time question, first this.
Introduction to three properties of iOS development Uiscrollview