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