Relationship action method between parent class and child class

Source: Internet
Author: User

One, the claim of the random number

1, Arc4random ()%10

2, Arc4random_uniform (10)

Both methods produce the same effect!

Second, the common method of UIView

1, Addsubview

[Self.view Addsubview:newview];

2, nsarrary* Subviews This is an array to return the components in the view

3. Get the last component in the current view

[Self.view.subviews Lastobject];

4. Delete the last component in the current view

[Last Removefromsuperview];

5, (UIView *) Viewwithtag: (int) MyTag

1>, the first is the component that returns the tag value is MyTag

2>, if there is more than one child control has the same tag value, then will first get the position of the previous control where the tag value also contains himself, it is also a tag value

3>, tag default is 0;

Relationship action method between parent class and child class

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.