ios - Iphone Core图像过滤器

标签 ios cocoa-touch

我对此感到奇怪,我已经在许多站点中看到描述了iPhone不支持Iphone上的Core Image滤镜的情况。但是我在Apple开发者网站的Core Animation示例页面中看到了Core图像过滤器。
只需在这里Iphone OS Reference Library看,您将在此页面上看到该示例

CIFilter *filter = [CIFilter filterWithName:@"CIBloom"];
[filter setDefaults];
[filter setValue:[NSNumber numberWithFloat:5.0] forKey:@"inputRadius"];

任何对此的描述将不胜感激。

最佳答案

Core Image在iPhone上不可用。从CATransition Class Reference谈起filter属性:

虽然CATransition类公开了
此属性,Core Image不是
在iPhone OS中可用。目前
此属性可用的过滤器
未定义。

另外,在CALayer Class Reference中,当谈论filter属性时:

虽然CALayer类公开了这一点
属性,Core Image不可用
在iPhone OS中。当前过滤器
可用于此属性的是
未定义。

正如Cory所指出的,该指南是为Mac编写的,并经过修改以适用于iPhone。不幸的是,他们留下了仅在Mac上可用的示例。

另请参阅问题:

  • How can I use CIFilter in iPhone OS?
  • CIFilter available in the iPhone SDK?
  • 关于ios - Iphone Core图像过滤器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2105475/

    相关文章:

    cocoa-touch - 将带逗号的数字转换为带点的数字。 ( cocoa touch )

    ios - 生成随机字符串后的奇怪返回值(Swift 3)

    ios - Xcode的Storyboard突然消失

    iphone - 光泽按钮以编程方式设置颜色

    IOS Storyboard将每个 subview 限制在屏幕底部

    iphone - 使 iPhone 应用程序兼容 iOS 5

    ios - 基本动画(滑动转动)

    ios - 用户拒绝健身数据时如何通知?

    ios - 当应用程序确实进入后台时,CLLocationManager 不会开始位置更新

    iphone - UIView nextResponder 如何知道 UIViewController 是什么?