How to add CIFilter to CALayer
NickName:new_programmer Ask DateTime:2010-09-18T01:30:15

How to add CIFilter to CALayer

I am new to core animation , i add some layers to my view and add image to it. Now i want to give blur effect to my layer

But i don't know how to make CIFilter and add it. I go through the related questions Question 1 Question2


My code is given below (Shows compilation error)

#import < UIKit/UIKit.h >
#import < QuartzCore/QuartzCore.h >
#import < CoreGraphics/CoreGraphics.h >


@interface T_CALayerPart3_View : UIView {

    CALayer *_layer1;
    CALayer *_layer2;
    CALayer *_layer3;
    CALayer *_layer4;
    CALayer *_layer5;
    CIFilter *_filter;    //<----- error here[Expected specifier -qualifier -list before CIFilter]

    CATransform3D *_rotate, *_scale;

}
@end

Give me some suggestion. Your suggestion is important to me. Don't leave the page without any Answer/ comment.

[sorry for my poor English]

Copyright Notice:Content Author:「new_programmer」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/3737577/how-to-add-cifilter-to-calayer

More about “How to add CIFilter to CALayer” related questions

How to add CIFilter to CALayer

I am new to core animation , i add some layers to my view and add image to it. Now i want to give blur effect to my layer But i don't know how to make CIFilter and add it. I go through the related

Show Detail

Using custom CIFilter on CALayer shows no change to CALayer

We are trying to create a custom CIFilter to add on top of our CALayer's. How ever only the default CIFilters seem to work on a CALayer. We created a small new project on the ViewController.swift we

Show Detail

Applying a CIFilter to a CALayer

CI Filters are now available in iOS 5, and I'm trying to apply one to a CALayer, the way you'd do it on Mac. Here's my code: CALayer *myCircle = [CALayer layer]; myCircle.bounds = CGRectMake(0,0,...

Show Detail

How to apply CIFilter to CALayer

I'm trying to understand how to apply CIFilter on a CALayer using the filter array property. According to the documentation this should be available from iOS5. This is my code so far. - (void)

Show Detail

How can I get a custom CIFilter to work on a CALayer for export using the AVVideoCompositionCoreAnimationTool

When using a custom CIFilter that relies on custom input parameters the parameters are not used once you set the filter to the CALayer backgroundFilters so you can render it as a video using

Show Detail

Applying more than two CIFilter over the CALayer

I am trying to make Canvas with CIFilter's for UIImageView. In my application user should have opportunity retouch his photo using UIPanGesture (Adding UIBezierPath to CALayer). But I've faced with a

Show Detail

OSX SDK changing alpha CALayer with CIFIlter

I have the following code for adding the blurred layer to my view: _layerBlurredTable = [CALayer layer]; _layerBlurredTable.frame = self.viewLocalizationInfoHolder.bounds; CIFilter *blur = [CIFilter

Show Detail

CIFilter blurry on CALayer on Retina display

If I add a CIFilter to a CALayer like this... filteredLayer.filters = @[filter]; ...the filter works fine on a normal display. However, the same code running on a Retina display applies the filte...

Show Detail

I want to Apply Filters to the recorded Video without using any third Party Framework .I had tried to use CIfilter to CAlayer but its not Working

I want to Apply Filters to the Prerecorded Video without using using any third Party Framework How can I do It.I had tried to use CIfilter to CAlayer but its not Working.Here is my code: CALayer *

Show Detail

How to use a CIFilter on the layerClass instance of an UIView?

My UIView is using an instance of TBPaperLayer for its layer. +(Class)layerClass { return [TBPaperLayer class]; } I would like to create a CIFilter to modify the appearance of this layer -

Show Detail