简体   繁体   中英

UIImageView Increase Brightness in specific area

How can I increase brightness in specific area of a UIImageView, For ex:I have an imageview with image.I want to increase the brightness of image in specific elliptical area of that image. I know how to increase the brightness of whole image , But dont know for specific elliptical area.

You can add a black UIView with a specific alpha apply on it (this will control how dark you want your view) and attach a mask layer to this view that has an ellipse. For the part of your view that is masked it will be brighter.

You need to import the Quartzcore framework when you are working with layer/mask. The mask is a property of your view layer ( [yourView layer].mask ).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM