出于某种原因,当我加载一个新视图(来自.xib)时,它将加载类文件,但不是.xib !!
这是我的代码:
login *lo =[[login alloc] initWithNibName:@"login" bundle:nil];
self.log = lo;
UIViewController *loginview = log;
[UIView setAnimationTransition:UIViewAnimationCurveEaseIn forView:self.view cache:YES];
[loginview viewWillAppear:YES];
[self.view removeFromSuperview];
[self viewWillDisappear:YES];
[self.view insertSubview:loginview.view atIndex:0];
[self viewDidDisappear:YES];
[loginview viewDidAppear:YES];
[UIView commitAnimations];
[log release];