this is how i do it with xcode 7.3.1
// create function
func sayhi(){
print("hello")
}
// create the button
let sayinghi = UIAlertAction(title: "More", style: UIAlertActionStyle.Default, handler: { action in
self.sayhi()})
// adding the button to the alert control
myAlert.addAction(sayhi);
// the whole code, this code will add 2 buttons
@IBAction func sayhi(sender: AnyObject) {
let myAlert = UIAlertController(title: "Alert", message:"sup", preferredStyle: UIAlertControllerStyle.Alert);
let okAction = UIAlertAction(title: "OK", style: UIAlertActionStyle.Default, handler:nil)
let sayhi = UIAlertAction(title: "say hi", style: UIAlertActionStyle.Default, handler: { action in
self.sayhi()})
// this action can add to more button
myAlert.addAction(okAction);
myAlert.addAction(sayhi);
self.presentViewController(myAlert, animated: true, completion: nil)
}
func sayhi(){
// move to tabbarcontroller
print("hello")
}