Loading a Welcome Screen (Splash Screen) Before Tabbarcontroller

Loading a Welcome Screen (Splash Screen) before TabBarController

The right way to do this would be to load your tab bar application normally, but use the presentModalViewController:animated: method of the tab bar controller to display a view controller over it (in application:didFinishLaunching:):

SplashScreenController *controller = [[SplashScreenController alloc] initWithNibNamed:nil bundle:nil];
[self.tabBarController presentModalViewController:controller animated:YES];
[controller release];

I'll usually put a "dismiss" button on the splash screen, but you could also do something like this:

[self.tabBarController performSelector:@selector(dismissModalViewControllerAnimated:) withObject:YES afterDelay:2.0];

which will present the view controller at launch and dismiss it after two seconds. Change the YESes to NOs to avoid the slide-up-from-the-bottom animation.

How to initialise a custom splash screen before loading tab bar controller in storyboard?

Instead of PushView Controller Use presentViewController
Try this Code

override func viewDidLoad() {
super.viewDidLoad()

_ = NSTimer.scheduledTimerWithTimeInterval(2.1, target: self, selector: #selector(Splash.someSelector), userInfo: nil, repeats: false)
// Do any additional setup after loading the view.
}

func someSelector() {
let storyboard : UIStoryboard = UIStoryboard(name: "Main", bundle: nil)
let vc : TabBarCotroller = storyboard.instantiateViewControllerWithIdentifier("TabBarCotroller") as! TabBarCotroller

let navigationController = UINavigationController(rootViewController: vc)
self.present(navigationController, animated: true, completion: nil)
}

Splash Screen before TabBarController

My guess is that the tab bar controller is ignoring your call to presentModalViewController:animated: because it isn't on screen yet. Try moving the call to after the tab bar view has been added as a subview to the window. It may have to happen even after the call to makeKeyAndVisible.

Show a loading view and switching to TabBarController in iPhone app

I would suggest using a modal view controller for the loading view:

- (void)presentModalViewController:(UIViewController *)modalViewController animated:(BOOL)animated

If you present the modal view controller as soon as your app launches (with no animation), it will be on top of everything, including the tab bar, even if it was presented by one of the tab view controllers.

Once the loading is done, you can dismiss the modal view controller:

- (void)dismissModalViewControllerAnimated:(BOOL)animated

You could animate the dismissal or not.

If your Default.png (launch screenshot) looks like the modal view, the whole thing should be pretty seamless.

Display login screen before Tab bar controller

I think you have chosen wrong application layout. You should choose window based application. Then what you need to do is that first you set your login screen in the window of application and then once the login button is pressed you set your tabbar controller in the window of application. Just try it.

Add an initial view (front page) with a tab bar application (Xcode 3.2.5)

Take a look here: Loading a Welcome Screen(Splash Screen) before TabBarController

Launching a login view before the tab bar controller is displayed

Finally figured this one out.. here is what you need to do:

  1. Add a standalone login view to the storyboard.

  2. Select the login view and in the attributes inspector, check the 'Is Initial View Controller'. This will switch the initial view being launched from the tab controller to the login view, thereby solving the whole issue of displaying the login screen first.

  3. Add a button to the login view and create a segue to load the tab controller on push of the button. (Or you can create a segue from the login view to the tab controller view and programmatically invoke the segue as necessary).

  4. Select the login view and choose option Editor > Embed In > Navigation Controller

  5. In the attributes inspector for the Navigation controller, uncheck the 'Shows Navigation Bar' option (this is a cosmetic change; I am assuming you don't need a navigation bar showing on the login screen !!)

That's it :)

switching to uitabbarcontroller (having views with customised header) after custom splashscreen (UIViewController) is loaded without storyboard

So I want to create a tabbarcontroller without storyboard which I am not aware how to do that.

UITabBarController *tabVC = [[UITabBarController alloc] init];
tabVC.viewControllers = @[viewController1,viewController2....];

Where viewController1 etc. are the view controllers that occupy each tab of the tab bar.

And switching from splashscreen viewcontroller to tabbar default view controller.

window.rootViewController = tabVC;

Where window is your application delegate's window property.



Related Topics



Leave a reply



Submit