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