摘要: 得到屏幕方向的有几种方法:viewController 的方向,self.interfaceOrientation设备方向:[[UIDevicecurrentDevice]orientation];当前程序方向: [[UIApplication sharedApplication] statusBarOrientation]; 阅读全文
posted @ 2013-07-26 10:01 漫步雨桥 阅读(903) 评论(0) 推荐(0) 编辑
摘要: UIImageWriteToSavedPhotosAlbum(image,nil,nil,nil); 阅读全文
posted @ 2013-07-26 00:48 漫步雨桥 阅读(137) 评论(0) 推荐(0) 编辑
摘要: h文件: @interface UIView (Screenshot) //目前最完善 - (UIImage*) screenshotAtFrame:(CGRect)r; @end m文件: //目前最完善 - (UIImage*) screenshotAtFrame:(CGRect)r { float scale = [UIScreen mainScreen].scale*2... 阅读全文
posted @ 2013-07-26 00:45 漫步雨桥 阅读(345) 评论(0) 推荐(0) 编辑
摘要: 复制UIImage到剪切版,在iOS 6 [[UIPasteboardgeneralPasteboard]setImage:_imageResult]; 无效 使用以下代码 [[UIPasteboardgeneralPasteboard]setData:UIImagePNGRepresentation(_imageResult) forPasteboardType:[UIPasteboard... 阅读全文
posted @ 2013-07-26 00:41 漫步雨桥 阅读(529) 评论(0) 推荐(0) 编辑
摘要: 1.block 中,可以声明block 的返回类型,并在block 中可以通过return 返回结果 block 的返回类型type也可以将block 的类型理解为type , 如在自定义类型中可以这样声明: 1 typedefvvoid(^AdModelRequestComplteHandle)(NSData *); 2.声明block: 返回类型 (... 阅读全文
posted @ 2013-07-26 00:39 漫步雨桥 阅读(268) 评论(0) 推荐(0) 编辑