iOS Life Circle Development Exercise record

Source: Internet
Author: User

First day

1. Open the Project

2. Re-project setup basic information, support iOS7 above, do not support horizontal screen, not iOS8 after launch, configure PCH

3. Add a category folder to the project (Comment,uis,third,model)

5. Again UIs folder for 9 folders (mainly 8 Tabbar interface, the other is a new feature display)

4.1) The goal of today's exercise is to write the base class Baseviewcontrorller for all classes in the Comment folder, which provides some of the methods used by the controller, such as the SDK's Mhua reminder box

2) Then the Navigationviewcontroller that inherits the base class is implemented by customizing the view, substituting the uinavigation of the system, having two buttons in the attribute, a label, a view, adding to the top in. m, Note that you want to dynamically calculate the actual size of the label

3) Create a custom jwtabbarviewcontroller that inherits Uitavbarcontroller, a UIView (TabBar) in the property to a final TabBar (more, I named Popview)

Note that you want to hide the system tabbar ([Self.view Remove ...]) and create a position where the Tabbar evenly distributes 5 buttons

Popview to manually create 5 UIButton, in order to embody the specific OC, encapsulation, do the 4th step operation

4) Open a new. H.M named Jwfactroy, the factory class, mainly implements the classes commonly used to generate UI controls, letting them pass in properties such as Frame,title,action,tager, and quickly creating a return Uibuuton

4.1) Create the corresponding viewcontroller in the UIs document, all of which are also inherited Jwnavviewcontroller (Base-nav-Each VIEWC, then controller one calls Super Viewdidload will implement all the methods of a parent class, the navigation.

5) in storyboard, drag into 8 uiviewcontroller,sb each Viewcontroller class fill UIs viewc, (need to fill in the storyboard ID, The reason is that recognition can be created in appdelegate)

6) In Appdelegate, create window, create successful [Self.window Makevi ...] The method lets the visual, create Jwtabbarviewcontroller, Global _tabbar (Why create global, convenient back VIEWC can hide TabBar),

6.1) Create Storyboard class Uistoryboard *strory = [uistoryboard storyboardwithname:@ "Main" bundle:nil];

6.2) Create a class in each UIs , JW Homeviewcontroller *home = [Strory instantiateviewcontrollerwithidentifier:@ "Jwhomeviewcontroller" ];(identifier is the SB ID filled in by SB)

6.3) Again uinavigationcontroller *homenav = [[uinavigationcontroller alloc] Initwithrootviewcontroller: Home];

6.4) created for 8, after success, as an array, added to the _tabbar property Viewcontrols

5. The SDK used today is mb,toast (all the Reminders box)

iOS Life Circle Development Exercise record

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.