Benobab
Benobab

Reputation: 428

Use toolbar to navigate properly

I'm trying to do a instagram-like (or any app with a toolbar in fact) toolbar, to navigate from screens to screens.

I have a navigation controller, with 5 screens, and I already did this :

self.toolbarItems = self.navigationController!.toolbarItems

@IBAction func profileButtonClicked(sender: UIBarButtonItem) { self.popToRootViewControllerAnimated(false) self.performSegueWithIdentifier("showProfile", sender: self) }

So it is working, but I don't like the transition when I go first to the navigationController then to the newViewController, I would like there is no transition at all.

I would be thankful if you help me.

Ben

Upvotes: 0

Views: 52

Answers (2)

Benobab
Benobab

Reputation: 428

FOUND :

just needed to uncheck "Animates", when you click on the segue in the storyBoard and then go to Attributes Inspector and just uncheck this checkbox.

enter image description here

Upvotes: 0

Mudith Chathuranga Silva
Mudith Chathuranga Silva

Reputation: 7444

  1. Click the view Controller on main storyboard
  2. Then go to attribute inspector
  3. There is a option called transition style, choose cross dissolve

    OR Use

      self.sourceViewController.presentViewController(self.destinationViewController as! UIViewController, animated: false, completion: nil)
    

Upvotes: 1

Related Questions