Uiviewcontroller life cycle

Source: Internet
Author: User

#import "DetailViewController.h"

@interface Detailviewcontroller ()

@end

@implementation Detailviewcontroller

#pragma the initialization method of the mark-View Controller Object

-(ID) Initwithnibname: (NSString *) Nibnameornil Bundle: (NSBundle *) Nibbundleornil

{

self = [super Initwithnibname:nibnameornil Bundle:nibbundleornil];

if (self) {

Custom initialization

NSLog (@ "%s", __function__);

}

return self;

}

#pragma mark-Methods for loading views

-(void) Loadview {

[Super Loadview];

NSLog (@ "%s", __function__);

}

#pragma mark-The view has been loaded complete

-(void) viewdidload

{

[Super Viewdidload];

Do any additional setup after loading the view.

NSLog (@ "%s", __function__);

}

#pragma mark-Implement---dismissbuttonaction: method

-(void) Dismissbuttonaction: (UIButton *) Sender {

Method of calling modal shutdown

[Self dismissviewcontrolleranimated:yes completion:nil];

}

#pragma mark-A memory warning has been received

-(void) didreceivememorywarning

{

[Super didreceivememorywarning];

Dispose of any resources the can be recreated.

NSLog (@ "%s", __function__);

}

#pragma mark-the view will appear

-(void) Viewwillappear: (BOOL) Animated {

[Super viewwillappear:animated];

NSLog (@ "%s", __function__);

}

#pragma mark-View already appears

-(void) Viewdidappear: (BOOL) Animated {

[Super viewdidappear:animated];

NSLog (@ "%s", __function__);

}

#pragma mark-The view is going to disappear

-(void) Viewwilldisappear: (BOOL) Animated {

[Super viewwilldisappear:animated];

NSLog (@ "%s", __function__);

}

#pragma mark-the view has disappeared

-(void) Viewdiddisappear: (BOOL) Animated {

[Super viewdiddisappear:animated];

NSLog (@ "%s", __function__);

}

#pragma mark-method that has been deprecated

-(void) Viewdidunload {

[Super Viewdidunload];

NSLog (@ "%s", __function__);

}

#pragma Mark-dealloc method

-(void) Dealloc {

NSLog (@ "%s", __function__);

[_dismissbutton release], _dismissbutton = nil;

[Super Dealloc];

}

@end

Uiviewcontroller life cycle

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.