Swift3-製作instagram的圖片圓角設定layer.cornerRadius

圖片變成圓形的技巧
 1.設定layer.cornerRadius = 50 
 設50的原因是我圖原來是100x100 pt ,圓半徑要變成一半
 2.本身圖片要是正方形!!
 3.要記得勾選clip to bounds(把多餘的部分裁掉)

最底下的tool bar item 也能換成網路抓的鬧鐘圖案

Unlisted


Originally published at swifthao的ios教學blog.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.