//视图加载完毕后调用的方法
- (void)viewDidLoad
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
if (self) {
// Custom initialization
NSLog(@"%s",__FUNCTION__);
}
return self;
}
//viewControl加载自己的view ,调用这个方法。
-(void)loadView
{
[super loadView];
NSLog(@"%s",__FUNCTION__);
}
//视图加载完毕后调用的方法
- (void)viewDidLoad
{
[super viewDidLoad];
NSLog(@"%s",__FUNCTION__);
// Do any additional setup after loading the view.
self.view.backgroundColor = [UIColor brownColor];
}
//加载完成的view 将要出现时调用
-(void)viewWillAppear:(BOOL)animated
{
[super viewWillAppear:animated];
NSLog(@"%s",__FUNCTION__);
}
-(void)viewDidAppear:(BOOL)animated
{
[super viewDidAppear:animated];
NSLog(@"%s",__FUNCTION__);
}
-(void)viewWillDisappear:(BOOL)animated
{
[super viewWillDisappear:animated];
NSLog(@"%s",__FUNCTION__);
}
-(void)viewDidDisappear:(BOOL)animated
{
[super viewDidDisappear:animated];
NSLog(@"%s",__FUNCTION__);
}
- (void)didReceiveMemoryWarning
{
[super didReceiveMemoryWarning];
NSLog(@"%s",__FUNCTION__);
// Dispose of any resources that can be recreated.
if (self.view.window == Nil) {
self.view = nil;
}
}
// UIButton * button =[[UIButton alloc]initWithFrame:CGRectMake(50, 50, 150, 50)];
// [button setBackgroundColor:[UIColor cyanColor]];
// [button setTitle:@"找回密码" forState:UIControlStateNormal];
// [button addTarget:self action:@selector(buttonClicked:) forControlEvents:UIControlEventTouchUpInside];
// NSLog(@"%@",[button currentTitle]);
// [self.view addSubview:button];
// [button release];
//-(void)buttonClicked:(UIButton *)button
//{
// NSLog(@"这是找回密码的东东~~~");
// ViewController2 * secondVC = [[ViewController2 alloc]init];
// [self presentViewController:secondVC animated:YES completion:^{
// NSLog(@"我来啦!");}];
//}
@interface NSTimer : NSObject