UIView have a method: SetCenter, SetBounds
SetCenter is the center point of the set control
SetBounds is the size of the set control
Control is added to a view, then the attached view moves.
Uiscrollview scrolling View
1.png formatted files do not need a home suffix to use: UIImage *image = [UIImage imagenamed:@ "keke01"]; < Johuanto file name is [email protected] The above method matches the image of half the size of the original picture
2. Do not scroll when the ScrollView content size is not set. [ScrollView setContentSize:image.size]; < to scroll after
3.scorllView Allow paging: [ScrollView Setpagingenable:yes]; < scrolling view has pagination effect when the picture is scrolled
4. Scrolling View Agent method Scrolling completion means that the page switch is complete:-(void) scrollviewdidenddecelerating: (Uiscrollview *) ScrollView {}; < protocol method, you need to add the protocol in. h and set yourself as the rationale.
Uipagecontrol Paging control controls
Common Properties:
Nsinteger numberofpages: Total pages
Nsinteger currentpage: The current page number
BOOL Hidesforsinglepage: Whether to hide the view when there is only one page
Uicolor *currentpageindicatortintcolor: The color of the currently selected page
Uicolor *pageindicatortintcolor: Colors on other pages
How to listen for paging controls: [Pagecontrol addtarget:self Action: (SEL) forcontrolevents:uicontroleventvaluechanged]; <;
Pagination Control page Change then departure action! The action parameter should be in the Uipagecontrol format.
iOS Learning Note (i)--scollview