如何更改dismissViewControllerAnimated的动画类型:完成:

时间:2014-09-27 19:39:00

标签: swift

我无法弄清楚如何正确使用 modalTransitionStyle = UIModalTransitionStyleCrossDissolve 我希望能够在第二个视图控制器和第一个视图控制器之间运行CrossDissolve动画。这是我的代码......

@IBAction func saveButton(sender: AnyObject) {

    //create sound
    var sound = Sound()
    sound.name = self.soundObjectName.text


    //add sound to tableView
    self.previousViewController.sounds.append(sound)


    //dismiss viewController

    self.previousViewController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve


    self.dismissViewControllerAnimated(false, completion: nil)


}

0 个答案:

没有答案