0
点赞
收藏
分享

微信扫一扫

loaded the "*****" nib but the view outlet was not set 错误的解决办法。

芒果六斤半 2023-07-14 阅读 48

loaded the "*****" nib but the view outlet was not set 错误的解决办法。

在Xcode下不用Storyboard做一些试验时,总是提示:loaded the "*****" nib but the view outlet was not set

网上搜索了一下,发现是nib文件没有跟xxxViewControler关联导致的.

1, 打开nib文件

2, 点击"File's Owner", 按command+4,设置Class为xxxViewControler

3, 按Control+"Files's Owner", 里面有个默认的IBOutlet变量view, 看一下后面有没有做关联,如果没有就拉到下面的View和视图做个关联

如下图,是增加关联后可以看到的,一定要有view 那个关联。

loaded the "*****" nib but the view outlet was not set 错误的解决办法。_搜索

举报

相关推荐

0 条评论