iOS 一种自定义颜色的方法
2016-01-18 16:02
323 查看
如题:
- (UIColor*)colorWithRGB:(unsignedint)RGBValue
{
return [UIColorcolorWithRed:((RGBValue&0xFF0000)>>16)/255.0
green:((RGBValue&0xFF00)>>8)/255.0
blue:(RGBValue&0xFF)/255.0alpha:1];
}
调用
self.view.backgroundColor = [selfcolorWithRGB:0xAD21F];
- (UIColor*)colorWithRGB:(unsignedint)RGBValue
{
return [UIColorcolorWithRed:((RGBValue&0xFF0000)>>16)/255.0
green:((RGBValue&0xFF00)>>8)/255.0
blue:(RGBValue&0xFF)/255.0alpha:1];
}
调用
self.view.backgroundColor = [selfcolorWithRGB:0xAD21F];
相关文章推荐
- iOS x-www-form-urlencoded格式传参
- iOS 调试
- ios设备信息
- iOS CAReplicatorLayer简单笔记
- iOS截屏
- iOS空页面 DZNEmptyDataSet
- ios crash 日志分析
- iOS开发~CocoaPods使用详细说明
- IOS模拟动态图 大图和小图动态切换
- IOS-学习笔记(1)
- iOS9 提示框的使用
- IOS UserDefaults简介(一)
- iOS内存管理之@property属性详解
- iOS-内测-蒲公英应用内测使用
- 《ios与os x多线程和内存管理》
- ios 简单绘制
- iOS 多语言版本的开发
- 如何处理iOS中照片的方向
- ios耗时操作
- IOS处理位图