UIImage图片转成base64字符串: UIImage *_originImage = [UIImage imageNamed:@"full_playlist_hl.png"]; NSData *_data = UIImageJPEGRepresentation(_image, 1...
分类:
其他好文 时间:
2015-04-27 20:00:34
阅读次数:
138
-(void)viewDidLoad
{
[super viewDidLoad];
imageView=[[UIImageView alloc] initWithFrame:CGRectMake(100, 150, 120, 120)];
imageView.image=[UIImage imageNamed:@"2.jpg"];
[s...
分类:
移动开发 时间:
2015-04-21 13:08:41
阅读次数:
158
UIButton * btn; [btn setImage:[UIImage imageNamed:@"a.png"] forState:UIControlStateNormal]; [btn setImage:[UIImage imageNamed:@"b....
分类:
其他好文 时间:
2015-04-20 13:02:45
阅读次数:
111
UIBarButtonItem * item = [UIBarButtonItem appearance];
UIImage* image = [UIImage imageNamed:@"back_icon"];
[item setBackButtonBackgroundImage:[image resizableImageWithCapInsets:UIE...
分类:
移动开发 时间:
2015-04-17 15:47:31
阅读次数:
136
1 [[UIImage imageNamed:@"button_textured_30"] resizableImageWithCapInsets:UIEdgeInsetsMake(0, 5, 0, 5)];其中Insets这个参数的格式是(top,left,bottom,right),从上、左、下...
UIImageView *imgView=[[UIImageView alloc]initWithFrame:CGRectMake(100, 100, 75, 75)]; imgView.image=[UIImage imageNamed:@"a"]; imgView.tag=200; [se...
分类:
其他好文 时间:
2015-04-16 21:46:07
阅读次数:
154
- (void)watermark { UIImage *oldImage = [UIImage imageNamed:@"事先准备好的图片,你将要在这帐图片上添加水印"]; UIGraphicsBeginImageContextWithOptions(oldImage.size, NO, 0...
分类:
移动开发 时间:
2015-04-16 13:56:56
阅读次数:
141
- (void)tailoring { UIImage *oldImage = [UIImage imageNamed:@"实现准备裁剪的图片.png"]; CGFloat borderW = 2; CGFloat imageW = oldImage.size.width + borderW...
分类:
移动开发 时间:
2015-04-16 13:52:52
阅读次数:
144
?方式一:有缓存(图片所占用的内存会一直停留在程序中)+ (UIImage *)imageNamed:(NSString *)name;name是图片的文件名?方式二:无缓存(图片所占用的内存会在一些特定操作后被清除)+ (UIImage *)imageWithContentsOfFile:(NSS...
分类:
其他好文 时间:
2015-04-15 19:01:37
阅读次数:
131
//创建一个UIImage对象UIImage *image = [UIImage imageNamed:@"scene1.jpg"];//1.建立bitmap ContextUIGraphicsBeginImageContext(image.size);//2.把原图绘制到context上[imag...
分类:
其他好文 时间:
2015-04-13 22:52:03
阅读次数:
139