iOS 错误 : No visible @interface for 'GPUImageSmoothToonFilter' declares the selector 'setBlurSize'

标签 ios xcode gpuimage

尝试在 Xcode 8.3.2 上构建时,出现以下错误:

            [(GPUImageSmoothToonFilter *)filter setBlurSize:filterSettingsSlider.value];

错误:“GPUImageSmoothToonFilter”没有可见的@interface 声明选择器“setBlurSize”

enter image description here

我该如何解决这个问题?


另一个问题(类似于上面那个)是这样的:

                tempImage = [lookupFilter imageFromCurrentlyProcessedOutput];

错误:'GPUImagelookupFilter' 的可见@interface 声明选择器'imageFromCurrentlyProcessedOutput'

enter image description here

我该如何解决这个问题?

谢谢!

最佳答案

它告诉您,因为 GPUImageSmoothToonFilter 没有 setBlurSize: 方法。你可以看到 here .

上面的代码似乎是从框架附带的 FilterShowcase 示例应用程序中复制和粘贴的(添加了您的 isPurchased 检查)。我猜你是从大约 2013 年左右的非常旧版本的框架中复制的,因为 this commit 2013 年 10 月在许多地方重命名了 blurSize 属性。

如果您使用的是现代版本的框架,并且您的应用程序基于 FilterShowcase 示例,我建议您查看该示例的最新版本以了解现在的接口(interface)。您还可以查看代码中的接口(interface)或查看最新的文档。

关于iOS 错误 : No visible @interface for 'GPUImageSmoothToonFilter' declares the selector 'setBlurSize' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44168049/

相关文章:

ios - CMake:如何将目录复制到 ios 应用程序包中

android - 制作视频合并移动应用程序的最佳方法

ios - 需要有关自动布局的帮助

ios - 写入 PFInstallation

ios - GPUImage 第一次模糊时速度很慢

ios - 应用程序在后台ios时如何录制视频

ios - 重复忙圈动画

javascript - 如何在 React-Native 中使用时间来发出通知?

iphone - 在 UITableView 的顶部和底部添加按钮

android - 基于 GLES 2.0 着色器的滤镜可实现平滑皮肤