Tracking AppInfo Code

Source: Internet
Author: User
Tags home screen

                             Tracking AppInfo Code

Model The property methods in are shared, so write them in the . h file.

data manipulation in Model completed in .

when the program runs, first execute the Viewcontroller, it will work on its own member initialization! After the preparation is finished, the load operation of the view that it manages is started , and it goes to the viewdidload method .

when carried out here due to its members to itself Nsarray *applist was carried out Setter Override, so the rewrite is called after the Setter Method .

in the setter method -(Nsarray *) applist , it is judged if _applist is empty, the [Appinfomodel appinfolist] is called to assign the value. To get the model array for the Appinfomodel .

This went to the class Appinfomodel . (Model layer )

appinfolist is to return a mutable array, changing the contents of the array to its own model, which includes the name and Icon two properties.

When the program executes this step, the Controller has extracted the data from the local plist and is saved in a name called appinfomodel array of c3>.

and then back to the controller 's Viewdidload method,

The program executes appinfoview *appview = [Appinfoview appinfoviewwithappinfo:self.applist[i]]; (view layer)

This sentence passed in a parameter self.applist[i], This parameter is the model, which is stored in the applist array, by subscript Determines that this is a model that exists in the plist . and the method Appinfoviewwithappinfo: very simple, the function is to create a view, this view contains not only the view (a label, an image, a button), and also contains the appinfo information from the incoming model , And saved in this view 's member properties Iconimage and Namelabel .

To perform this step, the data and viewthat are stored locally in the plist file are loaded and then the 9 App VI EW is arranged and added to the view managed by the controller .

Next is when the user clicks the download button, the home screen will display a label prompt is being downloaded and disappears after a few seconds, this is B ( the view that Controller manages) To listen for a (Appview), when a is clicked, B to add that label to display for a few seconds before disappearing.

so use the proxy mode, B for a the agent, when a was clicked, notice b you have been clicked, what needs to be done.

Controller in

Appinfoview in

Controller the.

Well, that's the general process of this program.

Tracking AppInfo Code

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.