dismiss two controllers Swift

前端 未结 2 745
情深已故
情深已故 2020-12-21 17:35

I have this situation :

I have a first view controller , when tap on button in it I open in modal mode another view controller , in this view controller when I tap a

2条回答
  •  情话喂你
    2020-12-21 18:25

    Thanks all for reply and edited my question :)

    I found 2 line code to resolved my problem:

    let appDelegate = UIApplication.sharedApplication().delegate as! AppDelegate appDelegate.window!.rootViewController?.dismissViewControllerAnimated(true, completion: nil).

    And that work well.

    Thanks very much

提交回复
热议问题