cocos / engine-native

Native engine for Cocos Creator v2.x
http://www.cocos.com/en/products
697 stars 572 forks source link

3.4.2 IOS Can not use UINavigationController #4287

Open speakissilver opened 2 years ago

speakissilver commented 2 years ago

The app crashed when I try to run:

"UINavigationController *nav = [[UINavigationController alloc]initWithRootViewController:_viewController]; [self.window setRootViewController:nav];"

and the error message shows:

"Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[CALayer pixelFormat]: unrecognized selector sent to instance 0x280263d20'"

I think there might be something wrong with the following part:

"uintptr_t windowHandle = reinterpret_cast(UIApplication.sharedApplication.delegate.window.rootViewController.view);"

image

Can you advise how to solve this problem?

minggo commented 2 years ago

@speakissilver engine-native is merge into https://github.com/cocos/cocos-engine . Could you please create issues there.