Besides being CIDiskBlurunavailable (with iOS SDK 5.1) and what setFilters:seems unavailable, you can do the following:
Create a CIImage input from the contents of your layer:
CIImage *inputImage = [CIImage imageWithCGImage:(CGImageRef)(myCircle.contents)];`
Apply your filters and get the result in CGImageRef:
CIFilter *filter = [CIFilter filterWith...];
...
CIImage *outputImage = [filter outputImage];
CIContext *context = [CIContext contextWithOptions:nil];
CGImageRef cgimg = [context createCGImage:outputImage fromRect:[outputImage extent]];
Finally, set CGImageRef to the layer:
[myCircle setContents:(id)cgimg]
That should work :)
source
share