![](/img/trans.png)
[英]How to take reference of viewcontroller in NSObject class in swift?
[英]How to switch between NSObject Class to ViewController
我必须对扩展NSObject
类进行分类,然后对视图控制器进行分类。
什么是我的问题是,我想去NSObject
到view controller
加载我的xib
是文件view controller
。
我使用了传统方法,到目前为止没有成功。
假设NSObject是MagentoLogin.m,我想转到viewController,如何实现呢?
MyAppDelegate *appDelegate = (MyAppDelegate *)[[UIApplication sharedApplication] delegate];
[appDelegate.navigationController presentViewController:myNewViewController animated:YES completion:nil];
尝试这种希望会有所帮助
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.