根据UIColor 创建UIImage
2015-09-21 15:26
465 查看
CGSize imageSize = CGSizeMake(self.doneButton.frame.size.width, self.doneButton.frame.size.height);
UIGraphicsBeginImageContextWithOptions(imageSize, 0, [UIScreen mainScreen].scale);
[[UIColor whiteColor] set];
UIRectFill(CGRectMake(0, 0, imageSize.width, imageSize.height));
UIImage *pressedColorImg = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
UIGraphicsBeginImageContextWithOptions(imageSize, 0, [UIScreen mainScreen].scale);
[[UIColor whiteColor] set];
UIRectFill(CGRectMake(0, 0, imageSize.width, imageSize.height));
UIImage *pressedColorImg = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
相关文章推荐
- 【UEditor】php版的UEditor 1.3.x图片上传目录的设置,与上传插件的修改
- SSH+easyUI开发方法论
- MUI - myStorage在ios safari无痕浏览模式下的解决方案
- iOS UIScrollViewDelegate
- NGUI坑爹的ScrollView
- UITextField
- UINT数相减
- ios8 新特性 UITableViewRowAction
- UIButton
- UILabel
- UI_霓虹灯
- 酷友观点/经验:UI设计师不可不知的安卓屏幕知识(原创文章)
- pycharm下pyuic工具使用问题解决方案
- UI01_UIView
- Java序列化及serialVersionUID作用
- UIStackView学习
- Sturts2如何获取request参数
- .net学习笔记----有序集合SortedList、SortedList<TKey,TValue>、SortedDictionary<TKey,TValue>
- ExtJS-Ext.ComponentQuery.query()
- 413 Request Entity Too Large