i have created one login and register view in that view after login user can seen its profile page in tabbar controller i have coded like that
-(void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName
{
if(nil != qName)
{
elementName = qName;
}
if ([elementName isEqualToString:@"ABC"])
{
//some code
}
else if ([elementName isEqualToString:@"DEF"])
{
//some code
}
else if ([elementName isEqualToString:@"GHI"])
{
//some code
}
else if ([elementName isEqualToString:@"JKL"])
{
//some code
}
else if ([elementName isEqualToString:@"end"])
{
[activityIndicator stopAnimating];
self.tabBarController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
[self presentModalViewController:self.tabBarController animated:YES];
[self.tabBarController release];
}
}
so after successing i am calling a tabbarcontroller which defined in xib file as tabbar controller . so problem is that when user successfully logged in the first view of tabbar controller it’s viewWillAppear method called twice and i can see error in console like this Using two-stage rotation animation is not supported when rotating more than one view controller or view controllers not the window delegate
and i have also done same code in register page but it’s going to be crashed in iOS 5.0 and it’s working in iOS 4.0. so is there any bug in my above code i am implementing login and register page methods like instagram , picyou and pinterest applications. plz help me i am stuck over here.
The reason is that you are using a UITabBarController outside of the intended usage of it. It is ONLY intended to be used as a root controller, and should you need something similiar to a tabbar use toolbar. I was running into trouble with the exact problem about a half year ago. You will also run into other problems if you use it like that, unfortunately.
Because the UITabBarController class inherits from the UIViewController class, tab bar controllers have their own view that is accessible through the view property. When deploying a tab bar interface, you must install this view as the root of your window. Unlike other view controllers, a tab bar interface should never be installed as a child of another view controller.
Replace your code with mine: