如何将数据从UIViewController传递到SWRevealViewController

时间:2017-09-20 18:32:24

标签: ios swift3 swrevealviewcontroller

我想将数据(登录/传递)从AuthentificationController传递到HomeController,HomeController与具有自定义segue' sw_front'的SWRevealViewController相关。 AuthentificationController和HomeController之间没有任何关系 我该如何传递数据?

如何使用SWRevealViewController

将数据发送到HomeController
   let storyboard = UIStoryboard(name: "Main", bundle: nil)
   let secondView = storyboard.instantiateViewController(withIdentifier: "swreveal") as! SWRevealViewController
// passing the data here
   self.present(secondView, animated: false, completion: nil)

1 个答案:

答案 0 :(得分:0)

您可以将数据传递给SWRevealViewController,然后传递给HomeController。