Page Control
Knowledge point:
(1) Page Control
The Page Control is used to create and Control Multiple View Controls in the iPhone SDK environment. It specifies a small dot for each view Control Page in the program and displays the current Page with a white dot, when clicking a small dot, the user guides the program to flip pages from one view control page to another.
(2) view instance methods addSubview and removeFromSuperview
In UIView (view object)
AddSubview instance method: Add a subview to the receiving control and display it at the top layer. This method also sets the receiver as the corresponding object in the next view, and the receiver retains the view.
RemoveFromSuperview: removes the receiver from its parent view or window and removes the receiver from the response chain. This view is released when the view is removed from the display list. This view is retained and used after the view is removed from the display list. For example, if you switch the positions of some views in this program, the positions of the views before removeFromSuperview is called are not retained. When the plan needs to reuse this view, make sure that the view is added to another UIView object as a subview before confirming that the message is sent.
Problem:
(1) There is no problem when you click the first or second display for the first time. If there is a problem with the third display, you can also click the first or second display.
(2) 1, 2, 3, 3, 2, and 1 are displayed in sequence.