xcode13 ios oc使用navigationController跳转页面

xcode13 ios oc使用navigationController跳转页面,第1张

在AppDelegate.h添加
@property (strong, nonatomic) UIWindow *window;

在AppDelegate.m添加
#import "ViewController.h"

  ViewController *vc = [[ViewController alloc] init];
    UINavigationController *navi = [[UINavigationController alloc] initWithRootViewController:vc];
    self.window.rootViewController = navi;
    [self.window makeKeyAndVisible];
    return YES;

在SceneDelegate.m添加

在SceneDelegate.m添加

添加跳转事件
#import "qweViewController.h"

- (void)buttonPrint{
    qweViewController* jdVC = [[qweViewController alloc]init];
    [self.navigationController pushViewController:jdVC animated:YES];

}



demo下载地址:https://download.csdn.net/download/moerduo0/39092007

欢迎分享,转载请注明来源:内存溢出

原文地址:https://www.54852.com/web/994633.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-05-21
下一篇2022-05-21

发表评论

登录后才能评论

评论列表(0条)

    保存