Lan Yi Education life cycle Delete Storyboard

Source: Internet
Author: User

Life cycle Order

N (void) Loadview load memory

(void) Viewdidload loading complete

(void) Viewwillappear: (BOOL) animated page will be rendered to the screen

(void) Viewdidappear: (BOOL) animated page has been rendered

(void) Viewwilldisappear: (BOOL) animated page will disappear

6-(void) Viewdiddisappear: (BOOL) animated page has disappeared

7-(void) didreceivememorywarning memory tension

Delete Storyboard, Viewcontroller, delete the storyboard in info.

In Appdelegate:

Initialize window

Self.window = [[UIWindow alloc]init];

Initialize the left side bar controller

Sgleftmenuviewcontroller *LVC = [[Sgleftmenuviewcontroller alloc]initwithnibname:@ "SGLeftMenuViewController" bundle : nil];

Initializing the master view Controller

Mainviewcontroller *MVC = [[Mainviewcontroller alloc]initwithnibname:@ "Mainviewcontroller" bundle:nil];

Add navigation Bar

Uinavigationcontroller *NC = [[Uinavigationcontroller ALLOC]INITWITHROOTVIEWCONTROLLER:MVC];

Adding the sidebar manager will also set the side bar controller and the main view controller

Mmdrawercontroller *DC = [[Mmdrawercontroller alloc]initwithcenterviewcontroller:nc LEFTDRAWERVIEWCONTROLLER:LVC];

Enables the sidebar to hold the home page, and the sidebar manager

LVC.MAINNVC = NC;

LVC.MMD = DC;

//Set side bar Properties

Set left sidebar width

[DC setmaximumleftdrawerwidth:240.0];

Set Open left sidebar mode

[DC Setopendrawergesturemodemask:mmopendrawergesturemodepanningcenterview];

Set off left sidebar mode

[DC Setclosedrawergesturemodemask:mmclosedrawergesturemodepanningcenterview];

Popup animation speed

[DC setanimationvelocity:10000];

[DC Setshouldstretchdrawer:no];

Setting the window's root view Controller

Self.window.rootViewController = DC;

Lvc.view.backgroundColor = [Uicolor Bluecolor];

[Self.window makekeyandvisible];

Lan Yi Education life cycle Delete Storyboard

Related Article

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.