0

My application is UITabBarController based. TestAppDelegate.h

@interface TestAppDelegate : NSObject <UIApplicationDelegate, UITabBarControllerDelegate>
{
    Facebook *facebook;
}

@property (nonatomic, retain) IBOutlet UIWindow *window;
@property (nonatomic, retain) IBOutlet UITabBarController *tabBarController;
@property (nonatomic, retain) Facebook *facebook;
@end

in FirstViewController i wrote this code

FormViewController *formViewController =[[FormViewController alloc]initWithNibName:@"FormViewController" bundle:nil];
formViewController.modalTransitionStyle = UIModalTransitionStyleFlipHorizontal;
[self presentModalViewController:formViewController animated:YES];

But when the view transit to fromViewController , the tabBar desappers .

user567
  • 3,150
  • 9
  • 40
  • 71
  • A [Modal View Controller](http://developer.apple.com/library/ios/#featuredarticles/ViewControllerPGforiPhoneOS/ModalViewControllers/ModalViewControllers.html) is supposed to cover the `UITabBarContorller`. Is it ok to assume that the `FormViewController` view is a form presented temporarily?(As opposed to being part of a hierarchy of views in a NavigationController). In other words, is it necessary to be able to view the `tabBar` while viewing the `FormViewController`? – tarheel Dec 14 '11 at 20:52
  • @tarheel not necessarily, but when I want to return to FirstViewController with the UITabBarContorller, if i will use Modal View Controller i will not see the UITabBarContorller ? – user567 Dec 14 '11 at 21:00
  • @Medhi 1) Are you using XIB's or a Storyboard? 2) I see what your transition is from `FirstViewController` to `FormViewController`, but can you post the code for going from `FormViewController` to `FirstViewController`? – tarheel Dec 14 '11 at 22:20
  • @tarheel i use xib interface . I not yet written the code but if i use [self dismissModalViewControllerAnimated:YES]; it work . But i want to make a multiple Modal View Controller transition, something like this , FirstViewController to FormViewController to ... to anotherViewController to FirstViewController . So if i do dismissModalViewControllerAnimated it will transit me to firstViewController or the previous model ? I hope you understand me – user567 Dec 14 '11 at 22:32
  • @Medhi Ok, Now I see it is not just a simple Modal view. Why don't you put a NavigationController(for FormViewController -> anotherViewController) inside of a tabBar item and make FirstViewController a separate tabBar item? – tarheel Dec 14 '11 at 23:25
  • @tarheel thank you but i founded the solution :) [[[self parentViewController] parentViewController] dismissModalViewControllerAnimated:NO]; http://stackoverflow.com/questions/2944191/iphone-dismiss-multiple-viewcontrollers – user567 Dec 15 '11 at 00:54

0 Answers0