// .获取上下文,之前的上下文都是在view的drawRect方法中获取(跟View相关联的上下文layer上下文) // 目前我们需要绘制图片到新的图片上,因此需要用到位图上下文 // 怎么获取位图上下文,注意位图上下文的获取方式跟layer上下文不一样。位图上下文需要我们手动创建。 // 开启 ...
分类:
移动开发 时间:
2016-11-04 20:47:18
阅读次数:
179
// MARK:- 把#ffffff颜色转为UIColor extension UIColor { class func colorWithHexString(hex:String) ->UIColor { var cString = hex.trimmingCharacters(in:Charac ...
分类:
编程语言 时间:
2016-11-04 16:21:33
阅读次数:
403
NSString*starsPath=[[NSBundlemainBundle]pathForResource:@"star"ofType:@"png"];UIImage*theImage=[[UIImagealloc]initWithContentsOfFile:starsPath];theImage=[theImagep_w_picpathWithRenderingMode:UIImageRenderingModeAlwaysTemplate];stars.tintColor=[UIColororange..
分类:
其他好文 时间:
2016-10-25 19:49:39
阅读次数:
167
四种容错格式的尺寸:27、31、31、35. // 5、将CIImage转换成UIImage,并放大显示 UIImage *imagex = [UIImage imageWithCIImage:outputImage]; NSLog(@"%f", imagex.size.height); 因为生成的 ...
分类:
移动开发 时间:
2016-10-25 01:52:43
阅读次数:
253
俗话说 “工欲善其事,必先利其器”,好的成熟的第三方,是我们开发路上的利器;俗话又说“君子生非异也,善假于物也”NB的人并不是生下来就和别人不一样,只是他们擅于使用工具罢了!,熟练使用这些第三方,你就是开发者的"君子"! 本篇旨在更详细指导怎么使用对应的第三方,不会过多说明第三方怎么实现!就像你买了 ...
分类:
其他好文 时间:
2016-10-24 13:54:14
阅读次数:
305
//filePath 是要上传到服务器图片的路径,如果是截图图片,你可以image对象新建一个,来获取路径,比如已知一个UIImage对象image: CGSize size=image.size; NSData *DATA=[self imageWithImage:image scaledToSi ...
分类:
移动开发 时间:
2016-10-23 19:57:25
阅读次数:
222
1 #import "ViewController.h" 2 #import <UIKit/UIMenuController.h> 3 4 @interface ViewController ()<UIScrollViewDelegate> 5 @property (strong, nonatomi ...
分类:
其他好文 时间:
2016-10-23 17:21:05
阅读次数:
182