Reputation: 197
I am creating a simple iOS application in which I have two CALayers, I want to add the blend effect on the upper CALayer to display the content on the second layer. I dont want to do it alpha. Is there any way to do this without changing the alpha?
Upvotes: 3
Views: 2370
Reputation: 31
There's a tricky way to achieve this.
compositingFilter
works but filter names should be like subtractBlendMode
(lower camel case), not CISubtractBlendMode
.
Here is a demo:
https://github.com/arthurschiller/CompositingFilters
Upvotes: 2
Reputation: 2545
Use property
opacity
of CALayer as there is nothing such as alpha. Its opacity instead of alpha so try setting opacity of the layers.
Upvotes: 0
Reputation: 386058
iOS (as of 5.1) does not currently support any blend effects on CALayer
. In my testing, the compositingFilter
property is ignored.
Upvotes: 6