gpt4 book ai didi

uiviewcontroller - -[UIView setShowsFPS :]: unrecognized selector error

转载 作者:行者123 更新时间:2023-12-03 23:38:10 24 4
gpt4 key购买 nike

我需要在按下 UIButton 时打开一个 ViewController,为此我使用以下命令代码:

NSString * storyboardName = @"Main";
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:storyboardName bundle: nil];
UIViewController * vc = [storyboard instantiateViewControllerWithIdentifier:@"ViewController"];
[self presentViewController:vc animated:YES completion:nil];

当它走完最后一行

[self presentViewController:vc animated:YES completion:nil];

它给我以下错误:

-[UIView setShowsFPS:]: unrecognized selector sent to instance 0x9bd5610 2013-07-16 14:40:52.728 ChainZoo[3026:a0b] * Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[UIView setShowsFPS:]: unrecognized selector sent to instance 0x9bd5610'

有人知道错误吗?提前致谢!!

最佳答案

storyborad 上,选择您的 ViewController 的 View 并点击“Show the identity inspector”(右上角的第三个小标签) .

您将看到自定义类 TextView 。

写入“SKView”并再次尝试运行。

您应该将 VC 的 View 初始化为 SKView。

关于uiviewcontroller - -[UIView setShowsFPS :]: unrecognized selector error,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17685769/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com