摘要: 文件Base64以后会翻倍的涨,例如一张52kb的图片 base64以后string文件大小为185kb,在通过string转回图片为135kb图片转文字:UIImage *_originImage = [UIImage imageNamed:@"0.jpg"]; NSData *_data = U... 阅读全文
posted @ 2015-04-27 22:40 嗷大喵 阅读(1351) 评论(0) 推荐(0) 编辑
摘要: ~/Library/Developer/Xcode/UserData/FontAndColorThemes~/Library/Developer/Xcode/UserData/CodeSnippetsXcode6备份这2个目录即可 阅读全文
posted @ 2015-04-13 13:49 嗷大喵 阅读(415) 评论(0) 推荐(0) 编辑
摘要: fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't map input file: xxxFramework.framework... 阅读全文
posted @ 2015-04-10 23:40 嗷大喵 阅读(12780) 评论(0) 推荐(1) 编辑
摘要: #define singleton_interface(className) \+ (className *)shared##className;// @implementation#define singleton_implementation(className) \static classNa... 阅读全文
posted @ 2015-04-08 23:16 嗷大喵 阅读(272) 评论(0) 推荐(0) 编辑
摘要: UIView *cutView = self.view.window.rootViewController.view; //截图 //开启上下文 UIGraphicsBeginImageContextWithOptions(cutView.frame.size, YES, 0.... 阅读全文
posted @ 2015-04-07 19:09 嗷大喵 阅读(157) 评论(0) 推荐(0) 编辑
摘要: 给同一种类型的block定义一个别名typedef int (^MyBlock) (int , int); int main(int argc, const char * argv[]) { @autoreleasepool { MyBlock sumBlock = ^(int ... 阅读全文
posted @ 2015-04-07 19:07 嗷大喵 阅读(323) 评论(0) 推荐(0) 编辑
摘要: //gcd的定时器timer必须先保存为一个属性或者成员变量@property (nonatomic , assign) dispatch_source_t timer; //第一种 每一秒执行一次(重复性) double delayInSeconds = 1.0; //每间隔... 阅读全文
posted @ 2015-04-07 19:03 嗷大喵 阅读(340) 评论(0) 推荐(0) 编辑
摘要: 最近使用CocoaPods来添加第三方类库,无论是执行pod install还是pod update都卡在了Analyzing dependencies不动原因在于当执行以上两个命令的时候会升级CocoaPods的spec仓库,加一个参数可以省略这一步,然后速度就会提升不少。加参数的命令如下:pod... 阅读全文
posted @ 2015-04-07 18:58 嗷大喵 阅读(353) 评论(0) 推荐(0) 编辑
摘要: //设置导航栏baritem和返回baiitem样式UIBarButtonItem *barItem = [UIBarButtonItem appearance];//去掉返回按钮上的字[barItem setBackButtonTitlePositionAdjustment:UIOffsetMak... 阅读全文
posted @ 2015-04-07 18:51 嗷大喵 阅读(1082) 评论(0) 推荐(0) 编辑
摘要: IAPHelper.h//// IAPHelper.h// airplay//// Created by apple on 13-10-23.// Copyright (c) 2013年 itcast. All rights reserved.//#import typedef void (... 阅读全文
posted @ 2015-04-05 19:31 嗷大喵 阅读(706) 评论(0) 推荐(0) 编辑