我正在開發一個簡單的遊戲。我創建了一個打開自定義警報視圖的暫停按鈕(我使用了vikmeup's SCLAlertView)。在這個警報(view img)我希望這個按鈕之一打開另一個名爲MenuViewController的ViewController,其中包括主菜單。那可能嗎?我怎樣才能爲segue/unwind分配一個標識符?使用自定義警報視圖中的按鈕在Swift中的另一個ViewController中繼續遊戲
這是我的代碼現在:
@IBAction func menuButton(sender: AnyObject) {
let alert = SCLAlertView()
alert.addButton("button 1", target:self, selector:Selector("firstButton"))
alert.showSuccess(kSuccessTitle, subTitle: kSubtitle)
}
正常工作... :) tnks –