04 2014 档案
摘要:使用CAShapeLayer与UIBezierPath可以实现不在view的drawRect方法中就画出一些想要的图形步骤:1、新建UIBezierPath对象bezierPath2、新建CAShapeLayer对象caShapeLayer3、将bezierPath的CGPath赋值给caShapeLayer的path,即caShapeLayer.path =bezierPath.CGPath4、把caShapeLayer添加到某个显示该图形的layer中下面的小例子是一个环形的progress代码,有具体的使用方法.h文件:[cpp]view plaincopy#import#import@
阅读全文
摘要:方法一NSString *homebrew= @"ImperialIndia Pale Ale (IPA)";//从末尾开始搜索"ia"字符串NSRange range = [homebrew rangeOfString:@"ia"options:NSBackwardsSearch];方法一z方法二NSString *tempDoucment = NSTemporaryDirectory();//获取缓存目录NSCharacterSet *charSet = [NSCharacterSetcharacterSetWithCharact
阅读全文

浙公网安备 33010602011771号