Objective-C UIColor -> UIImage -?(UIImage*)?createImageWithColor:?(UIColor*)?color
{
????CGRect?rect=CGRectMake(0.0f,?0.0f,?1.0f,?1.0f);
????UIGraphicsBeginImageContext(rect.size);...
分类:
其他好文 时间:
2015-09-06 14:45:02
阅读次数:
189
刚刚无聊,画了一个月亮。- (void)viewDidLoad { [super viewDidLoad]; self.view.layer.backgroundColor = [UIColor blackColor].CGColor; CALayer *layer = [CALayer ...
分类:
其他好文 时间:
2015-08-31 21:31:49
阅读次数:
96
//获取上下文 CGContextRef context =UIGraphicsGetCurrentContext(); //线条加粗 CGContextSetLineWidth(context , 5); //设置背景颜色 [[UIColor grayColor]set]; UIRectFill(...
分类:
其他好文 时间:
2015-08-29 09:39:15
阅读次数:
186
//获取上下文 CGContextRef context =UIGraphicsGetCurrentContext(); //线条加粗 CGContextSetLineWidth(context , 5); //设置背景颜色 [[UIColor grayColor]set]; UIRectFill(...
分类:
其他好文 时间:
2015-08-29 09:36:37
阅读次数:
138
- (UIColor*) getPixelColorAtLocation:(CGPoint)point { UIColor* color = nil; CGImageRef inImage = self.image.CGImage; // Create off screen bitmap conte...
分类:
其他好文 时间:
2015-08-28 21:17:15
阅读次数:
180
自定义UITableViewCell的背景颜色,实际上是对cell的contentView的背景颜色进行设置,所以可以有以下方法:方法一:cell.contentView.backgroundColor = [UIColor redColor];方法二:UITableViewCell *cell =...
分类:
其他好文 时间:
2015-08-28 15:11:30
阅读次数:
132
#import "RootViewController.h"#import "ActionView.h"#import "UIColor+MyUIColor.h"@interface RootViewController ()@end@implementation RootViewControlle...
分类:
移动开发 时间:
2015-08-27 22:33:57
阅读次数:
402
#import "RootViewController.h"#import "UIColor+MyUIColor.h"@interface RootViewController ()@end@implementation RootViewController/* UITapGestureRecogn...
分类:
移动开发 时间:
2015-08-27 22:26:46
阅读次数:
194
在iOS 开发过程中,我们有时候可能会用到UIColor * color=[UIColor colorWithPatternImage:image];有时候会出现背景图片显示不完整或者背景图片显示是多张而不是一整张图片.这时候我们就需要将图片的尺寸放大或者缩小到View的大小来实现背景图片的完整.具...
分类:
移动开发 时间:
2015-08-27 18:19:04
阅读次数:
224
这个问题其实可以取个巧路,大家都知道设置SearchBar的tintcolor的方法searchBar.tintColor = [UIColor blueColor]; [[UIBarButtonItem appearanceWhenContainedIn:[UISearchBar class], ...
分类:
移动开发 时间:
2015-08-27 18:09:27
阅读次数:
3249