简体   繁体   中英

How to make UIImage rounded,Not rounded corner

Draw a circle,make a rounded UIImageView in it.How to get this, please guide me. thx!

Let's put it this way,

  • First we create a UIImageView to the size of the circle you want.Let's say you want this image to be a circular image,

http://united4iran.org/wp-content/uploads/2010/11/cell-phone-in-canada.jpg

  • Then you create another UIImageView one top of the previous one to the size of 320x480 and set this image to it (Assume this image size is 320x480),

Note: also remember that inner area of the circle in above image is transparent.

  • Then you should get a image like this,

http://img580.imageshack.us/img580/782/testjkn.png

Hope this will help you.

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