0

I am currently working on an iOS app that communicates with an Arduino via BLE, uses with multiple ViewControllers which are all set-up via Storyboard. The Views are managed via a TabBarController. At this moment I use an additional Tab to connect/Disconnect to/from the device.

But after the App is useless without the device, I want to have the ViewController (which manages the connecting task) pop up. I've read that I should use Segues, but I don't really know how to call them correctly, and I don't want to call them in every TabViewController.

1 Answer 1

1

Segues are what you should use, but I would suggest learning how storyboards work first. Ray Wenderlich will be a good resource to get you started. Segues can be used either through code or directly within a storyboard.

Your question is way to general to give a direct answer, as I'd write some 1000 words to get the basis down.

To keep it simple:

  • performSegue(withIdentifier: "segueIdentifier", sender: nil)

  • presentViewController(mainViewController, animated: true, completion: nil)

  • navigationController?.pushViewController(mainViewController, animated: true)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.