【发布时间】:2016-11-17 05:35:58
【问题描述】:
我有两个视图控制器 A 和 B。从我将一些数据发送回 A 视图控制器。我的 B ViewController 嵌入在 NavigationController 中。现在我要从下面的代码从 A 到 B。在这种情况下,我的委托方法不会被调用。
let storyboard = UIStoryboard(name: "DropboxView", bundle: nil)
let vc = storyboard.instantiateViewController(withIdentifier: "nav_drop") as! UINavigationController
let vc1:DropboxListingViewController = storyboard.instantiateViewController(withIdentifier: "DropboxListingViewController") as! DropboxListingViewController
vc1.CTprotocolDelegate = self
self.present(vc, animated: true, completion: nil)
请提出更好的方法。
【问题讨论】:
-
你的委托方法永远不会被调用是什么意思?您在哪里尝试调用委托方法?
-
在第一个视图控制器中
标签: ios iphone swift uinavigationcontroller swift3