Skip to content

报错[CAGradientLayer pixelFormat]: unrecognized selector sent to instance 0x600000232e20 #18808

Open
@baozittw

Description

@baozittw

Cocos Creator version

3.8.3

System information

MacBook Pro 15.4.1, 16pro模拟器

Issue description

无法设置跟控制器为其他任意自定义的控制器或UINavigationController,只能用_viewController为控制器,否则报错[CAGradientLayer pixelFormat]: unrecognized selector sent to instance 0x600000232e20

想通过导航push来实现原生和游戏页面的切换,但是貌似不能,现在我只能通过切换根控制器的方式切换原生和游戏画面

Relevant error log output

[CAGradientLayer pixelFormat]: unrecognized selector sent to instance 0x600000232e20

Steps to reproduce

// _viewController = [[ViewController alloc] init];
// _viewController.view = [[View alloc] initWithFrame:bounds];
// _viewController.view.contentScaleFactor = UIScreen.mainScreen.scale;
// _viewController.view.multipleTouchEnabled = true;
// [self.window setRootViewController:_viewController];

HomeViewController * vc = [HomeViewController new];
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:vc];
navController.navigationBarHidden = YES;
self.window.rootViewController = navController;

Minimal reproduction project

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugNeeds TriageNeeds to be assigned by the team

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions