摘要: array = @[[NSValue valueWithCGRect:self.bounds],[NSValue valueWithCGRect:CGRectMake(0, 0, width-3, height-3)],[NSValue valueWithCGRect:CGRectMake(0, 0... 阅读全文
posted @ 2015-06-15 17:08 从良少年 阅读(127) 评论(0) 推荐(0) 编辑
摘要: _audioPlayer = [[AVAudioPlayer alloc] initWithContentsOfURL:[NSURL fileURLWithPath:path] error:nil]; [_audioPlayer setDelegate:self]; [_... 阅读全文
posted @ 2015-06-15 16:37 从良少年 阅读(123) 评论(0) 推荐(0) 编辑
摘要: - (void)performSelector:(SEL)aSelector withObject:(id)anArgument afterDelay:(NSTimeInterval)delay inModes:(NSArray *)modes;- (void)performSelector:(SE... 阅读全文
posted @ 2015-06-15 16:32 从良少年 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 在iOS 5发布以后,苹果开始对Json的解析进行支持.所以至此开始如果你的App只能支持iOS5以上时就考虑别用开源框架了.毕竟用系统的速度才是最快的.那么开始:一:将拿到的Json字符串 转换成 Object,使用如下代码[csharp]view plaincopy+(id)JSONObject... 阅读全文
posted @ 2015-06-15 15:51 从良少年 阅读(166) 评论(0) 推荐(0) 编辑
摘要: CGContextDrawImage(context, CGRectMake(0, 0, self.frame.size.width, self.frame.size.height), self.icon.CGImage);//可以将一个图片按指定大小绘制,绘制出来的图片是反的CGContextTr... 阅读全文
posted @ 2015-06-15 12:29 从良少年 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 将一个View保存为PNG保存到本地1.首先写一个UIImage的分类,加入这个方法。+ (UIImage *)imageWithView:(UIView *)view { UIGraphicsBeginImageContextWithOptions(view.bounds.size, vie... 阅读全文
posted @ 2015-06-15 11:33 从良少年 阅读(183) 评论(0) 推荐(0) 编辑