self.tabBarController?.selectedIndex = 1let TBC: UITabBarController = self.storyboard?.instantiateViewControllerWithIdentifier("TBC") as! TabBarController
TBC.selectedIndex = 1var callback: ((successful:Bool)->Void)? = nilpopup.callback = {(successful:Bool)->Void in
if successful {
// something
} else {
// something
}
}if let callback = callback {
callback(successful: true)
}