Question

Basically I want to put an image on an UIView,and than cover this image with an semitransparent view to make the image blurring, eventually put an UIButton on the semitransparent view, now I want the image shows up clearly only in the button's frame. How can I do that? Thanks.

One picture is worth one thousand words.

enter image description here

Was it helpful?

Solution

The partial see-through effect is generally achieved by just putting an image view up front with a lower alpha. So I'm imagining three layers, background, text, and then the noise/lines/tinting. That gets you pretty close. If you need to blur, I guess you could do something like How to implement a box or gaussian blur on iPhone. Or if you render the box and text, rasterize, and then rotate, that might get you more than enough softening of the image that you wouldn't have to go through the blurring algorithms. You'll have to do a little experimentation.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top