iPhone 開發(fā) 實(shí)現(xiàn)圖片顯示圓角效果
作者:佚名
本文介紹的是iPhone 開發(fā) 實(shí)現(xiàn)圖片顯示圓角效果,UI設(shè)計(jì)實(shí)現(xiàn),內(nèi)容不多,代碼實(shí)現(xiàn)效果,先來看內(nèi)容。
iPhone 開發(fā) 實(shí)現(xiàn)圖片顯示圓角效果是本文要介紹的內(nèi)容,為了使自己的畫面更炫,不妨試一下本文的小實(shí)例,先來看內(nèi)容。
今天修改了以前的iphone程序代碼,主要對程序的 UI 做了修改,調(diào)整了布局,圖片,文字等顯示效果,看著更舒服了。
原來效果
修改后的效果
實(shí)現(xiàn)圓角圖片代碼:
view sourceprint?UIColor *color=[UIColor colorWithRed:0.95 green:0.95 blue: 0.95 alpha:0];
[asyncImage setBackgroundColor:color];//設(shè)置背景透明
/****設(shè)置圖片圓角begin***/
asyncImage.layer.masksToBounds = YES;
asyncImage.layer.cornerRadius = 5.0;
asyncImage.layer.borderWidth = 0.5;
asyncImage.layer.borderColor = [[UIColor grayColor] CGColor];
/****設(shè)置圖片圓角end****/
小結(jié):關(guān)于iPhone 開發(fā) 實(shí)現(xiàn)圖片顯示圓角效果 的內(nèi)容介紹完了,希望本文對你有所幫助!
責(zé)任編輯:zhaolei
來源:
博客園