0
보기를 표시하는 데 문제가 있습니다. 버튼이 현재보기에서 누르면, 다음과 같은 조치가 exected된다xcode보기가 호출되고 초기화되지만 표시되지 않습니다.
- (IBAction) vistaUser: (id)sender{
loginTabController *theInstance = [[loginTabController alloc] init];
[theInstance logIn:user.text :password.text];
}
다음, logIn
기능을 다음하는 것은 userViewControler
보기를 표시 할 수있는 사람이라고 만이 보여되지 않습니다. 보기가 현재보기로 유지됩니다. 그러나 userViewController
보기가 초기화되고이보기에서 getData
기능이 실행되었습니다! 왜 호출 된 뷰가 표시되지 않는지 이해할 수 없습니다! 도와 주셔서 감사합니다!
- (void)logIn: (NSString *)strUser: (NSString *)strPass
{
[UIView beginAnimations:@"View Flip" context:nil];
[UIView setAnimationDuration:1.0];
[UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
if (self.controladorUser == nil)
{
userViewController *aController = [[userViewController alloc] initWithNibName:@"userViewController" bundle:nil];
self.controladorUser = aController;
[aController release];
}
[UIView setAnimationTransition: UIViewAnimationOptionCurveEaseIn forView:self.view cache:YES];
[self.controladorPass viewWillDisappear:YES];
[self.controladorUser viewWillAppear:YES];
[self.controladorPass.view removeFromSuperview];
[self.view insertSubview:controladorUser.view atIndex:0];
[self.controladorPass viewDidDisappear:YES];
[self.controladorUser viewDidAppear:YES];
[UIView commitAnimations];
//getData call
userViewController *theInstance = [[userViewController alloc] init];
[theInstance getData:strUser :strPass];
}
첫점 해결 문제. 감사! – Jaume