如何在ViewController上传递数据?

时间:2019-06-03 10:08:23

标签: ios swift uiviewcontroller segue

我的应用程序有一个AuthenticationViewController,允许用户使用TouchID进行身份验证,一旦获得批准,就会显示银行交易列表(两者与segue链接,一旦获得批准就显示)。

现在,我已经添加了将自定义文件类型(交易)导入应用程序的功能。当用户打开文件时,它运行良好,并使用ImportTransactionViewController加载了名为application(_:open:options:)的vc。

将导入的交易“通过”我的AuthenticationViewController传递的最佳方法是什么,以便在用户获得批准后,ImportTransactionViewController加载我的导入交易。

总而言之,我目前有:

  

AuthenticationViewController->用户批准-> TransactionsViewController

但我也希望能够做到:

  

用户选择要导入的事务文件-> AuthenticationViewController(如果批准,将事务存储到下一个vc)->用户批准-> ImportedTransactionViewController(显示“通过” AuthenticationViewController的事务)。

对于实现这一目标的最简洁明了的任何建议,将不胜感激。

0 个答案:

没有答案