30 days for os7 proficient in iPhone mobile programming 13th days Page Control

Source: Internet
Author: User

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.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.