简体   繁体   English

如何在NSObject类和ViewController之间切换

[英]How to switch between NSObject Class to ViewController

I'm having to class one which extends NSObject and second the view controller. 我必须对扩展NSObject类进行分类,然后对视图控制器进行分类。

What is my problem is that I want to go to NSObject to view controller that loads my xib file of that view controller . 什么是我的问题是,我想去NSObjectview controller加载我的xib是文件view controller

I have used the traditional, with no success thus far. 我使用了传统方法,到目前为止没有成功。
Suppose NSObject is MagentoLogin.m and I want to go to viewController, how can I achieve this? 假设NSObject是MagentoLogin.m,我想转到viewController,如何实现呢?

MyAppDelegate *appDelegate = (MyAppDelegate *)[[UIApplication sharedApplication] delegate];
[appDelegate.navigationController presentViewController:myNewViewController animated:YES completion:nil];

try this hope it will help 尝试这种希望会有所帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如何在NSObject类中快速引用viewcontroller? - How to take reference of viewcontroller in NSObject class in swift? 如何将viewcontroller连接到NSObject类文件? - How to connect viewcontroller to NSObject class file? NSManagedObject临时使用,如何在NSObject和NSManagedObject之间切换 - NSManagedObject for temporary use, how to switch between NSObject and NSManagedObject 如何在ContainerView内部的ViewController之间切换? - How to switch between ViewController inside ContainerView? 在Viewcontroller中创建文本字段并在NsObject类中退出文本字段 - Creating textfield in Viewcontroller and resigning textfield in NsObject class 从NSObject类调用ViewController方法 - Call a ViewController method from NSObject Class 如何从 ViewController 到 NSObject 获取 UITextField 字符串 - How to get UITextField String from ViewController to NSObject 如何在xcode中将nsobject文件和nscollectionviewcontroller组合到viewcontroller或仅将nscollectionviewcontroller组合到viewcontroller - How to combine nsobject file and nscollectionviewcontroller to viewcontroller in xcode or nscollectionviewcontroller to viewcontroller only 如何从NSObject获取NSString变量值到ViewController - How to get NSString variable value from NSObject to ViewController 在同一个ViewController中的多个视图之间切换 - Switch between multiple views in the same viewcontroller
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM