The best tutorial??
Http://www.raywenderlich.com/76436/use-uiscrollview-scroll-zoom-content-swift
There's a lot of confusion when you look.
So I went through a lot of Uiscrollview's knowledge here to summarize, although I saw a lot of oc things, but there's no effect on understanding Uiscrollview.
There are some basic concepts that are just touching
Bounds is Superview, which is the upper-level size. It is calculated from the origin (0,0)
Frame is the coordinates of the current view the origin is set by itself below is their definition
1 -(CGRect)frame{
2 return CGRectMake(self.frame.origin.x,self.frame.origin.y,self.frame.size.width,self.frame.size.height);
3 }
4 -(CGRect)bounds{
5 return CGRectMake(0,0,self.frame.size.width,self.frame.size.height);
6
Contentsize is the size of the content and the size of the area that can be scrolled
Contentinset is another option for the specified scrolling area
Contentoffset is the distance from the origin of the content at the current view origin, as
[Swift] Uiscrollview Summary