我一直試圖通過調用dismissViewControllerAnimated解僱我的警報視圖,但不幸的是我沒有得到我想要的,因爲它將我發送到rooviewController(「UsersSwippingViewControllerUsers」/「Users 「),而不是留在提交它的視圖控制器(chatViewController)..dismissViewControllerAnimated從UIAlertController調用發送給我RootViewController
請你幫我一下。 我附上了我用來調用dismissViewControllerAnimated的代碼和我的故事板的屏幕截圖,讓您大致瞭解我的應用程序的外觀。該應用程序帶我到的視圖控制器是「UsersSwippingViewControllerUsers」/「用戶」,當它應該留在/帶我去ChatViewController。
截圖:
This is a preview of my app's storyboard
Here is the code I'm using dismissViewControllerAnimated in the handler of the UIAlertAction
>將操作類型更改爲.Cancel - 這不是必需的。你可以保持UIAlertActionStyle.Default。 –