6
Warning: no rule to process file '$(PROJECT_DIR)/YIFullScreenScrollDemo/../../Classes/UIViewController+YIFullScreenScroll.m' of type file for architecture i386

我正在尝试实现 YIFullScreenScrollDemo

在不断失败后,我只需将整个 .h 和 .m 文件复制到主项目。其实我一直参考。

现在以这段代码为例,通过编译检查:

self.fullScreenScroll = [[YIFullScreenScroll alloc] initWithViewController:self scrollView:self.tableView];

然而,在运行时,我得到了:

YIFullScreenScrollDemo[82387:c07] -[FirstViewController setFullScreenScroll:]: unrecognized selector sent to instance 0x7577e80

我也收到了这 4 个警告:

Warning: no rule to process file '$(PROJECT_DIR)/YIFullScreenScrollDemo/../../Classes/UIViewController+YIFullScreenScroll.m' of type file for architecture i386
Warning: no rule to process file '$(PROJECT_DIR)/YIFullScreenScrollDemo/../../Classes/YIFullScreenScroll.m' of type file for architecture i386
Warning: no rule to process file '$(PROJECT_DIR)/YIFullScreenScrollDemo/../Pods/JRSwizzle/JRSwizzle.m' of type file for architecture i386
Warning: no rule to process file '$(PROJECT_DIR)/YIFullScreenScrollDemo/../../Classes/UIView+YIFullScreenScroll.m' of type file for architecture i386

问题是什么?

注意:不重复另一个编译警告:没有规则来处理架构 i386 的文件

这个适用于 .m 文件。另一个问题是 .h 文件

当然,我们确实需要包含 .m 文件,对吧?

4

1 回答 1

6

如果您没有人们所指的 .h 问题,mojtaba 所说的内容适用于 .m 文件(+1)。

单击产品菜单,按住 ALT 以启用“清理构建文件夹...”选项,然后重新编译。错误消失了。

于 2013-09-30T20:49:15.050 回答