So I have this Storyboard.
And this is the code when you click the save button.
@IBAction func addGroupAction(_ sender: Any) {
self.name = groupNameTextField.text!
//show spinner progress dialog
self.hud.textLabel.text = "Loading..."
self.hud.show(in: self.view)
DispatchQueue.global(qos: .background).async {
if !self.uuid.isEmpty {
self.service.groupCreate(uuid: self.uuid, name: self.name, type: "regular", callback: {
status, message, json in
DispatchQueue.main.async {
print(status)
print(message)
print(json)
}
self.hud.dismiss()
//this block of code does not work
let storyboard = UIStoryboard(name: "Main", bundle: nil)
let controller = storyboard.instantiateViewController(withIdentifier: "MainTabbar") as! UITabBarController
self.present(controller, animated: true, completion: { () -> Void in })
})
} else {
print("no uuid")
}
}
}
I'd like to get out of Create Group View Controller and go back to Tab Bar Controller. Perform segue works, but it will show a "Back" navigation item bar button.