iOS development UI chapter-nine grid coordinate calculation

Source: Internet
Author: User

1. Complete the following layout

2. Analysis

Look for the law on the left, each uiview x-coordinate and y-coordinate.

3. Realization of Ideas

(1) Make clear what each piece is used for. View

(2) Identify the parent-child relationship between each view, with only one parent view and a large number of child views.

(3) You can first try to add a lattice, and finally consider using a for loop, complete the creation of all UIView

(4) Load the app data, create the corresponding number of squares according to the data length

(5) Adding child controls inside the lattice

(6) Assembling data for internal child controls

4. Some new methods or properties

4.1

-(void) Click on the     UILabel {//animated label     *animalab=[[uilabel Alloc]initwithframe:cgrectmake ( Self.view.center.x-100, SELF.VIEW.CENTER.Y+20, 200, 40)];     [Animalab settext:@ "Download Success"];     animalab.font=[uifont systemfontofsize:12.0];  Set Font size     [Animalab setbackgroundcolor:[uicolor Browncolor]];     [Animalab setalpha:0]    ; Transparency 94     [Self.view Addsubview:animalab]; [    UIView Beginanimations:nil Context:nil]; 97    [Animalab setalpha:1]; 98//    [UIView setanimationduration:4.0];//    [UIView commitanimations];100     101     //After execution, we have to delete this, we recommend using block Animation 102     set animation 103     [UIView animatewithduration:4.0 animations:^{104     [Animalab setalpha:1];105     } completion:^ (BOOL finished) {106         //[self.view re];107     }]; 108}

iOS development UI chapter-nine grid coordinate calculation

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.