04 2015 档案
摘要:https://developer.apple.com/library/downloads/docset-index.dvtdownloadableindex找到里面的文档下载地址例如iOS 8.3的离线文档下载地址,把地址复制下来用迅雷下载就快多了https://devimages.apple.c...
阅读全文
摘要:文件Base64以后会翻倍的涨,例如一张52kb的图片 base64以后string文件大小为185kb,在通过string转回图片为135kb图片转文字:UIImage *_originImage = [UIImage imageNamed:@"0.jpg"]; NSData *_data = U...
阅读全文
摘要:~/Library/Developer/Xcode/UserData/FontAndColorThemes~/Library/Developer/Xcode/UserData/CodeSnippetsXcode6备份这2个目录即可
阅读全文
摘要:fatal error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/lipo: can't map input file: xxxFramework.framework...
阅读全文
摘要:#define singleton_interface(className) \+ (className *)shared##className;// @implementation#define singleton_implementation(className) \static classNa...
阅读全文
摘要:UIView *cutView = self.view.window.rootViewController.view; //截图 //开启上下文 UIGraphicsBeginImageContextWithOptions(cutView.frame.size, YES, 0....
阅读全文
摘要:给同一种类型的block定义一个别名typedef int (^MyBlock) (int , int); int main(int argc, const char * argv[]) { @autoreleasepool { MyBlock sumBlock = ^(int ...
阅读全文
摘要://gcd的定时器timer必须先保存为一个属性或者成员变量@property (nonatomic , assign) dispatch_source_t timer; //第一种 每一秒执行一次(重复性) double delayInSeconds = 1.0; //每间隔...
阅读全文
摘要:最近使用CocoaPods来添加第三方类库,无论是执行pod install还是pod update都卡在了Analyzing dependencies不动原因在于当执行以上两个命令的时候会升级CocoaPods的spec仓库,加一个参数可以省略这一步,然后速度就会提升不少。加参数的命令如下:pod...
阅读全文
摘要://设置导航栏baritem和返回baiitem样式UIBarButtonItem *barItem = [UIBarButtonItem appearance];//去掉返回按钮上的字[barItem setBackButtonTitlePositionAdjustment:UIOffsetMak...
阅读全文
摘要:IAPHelper.h//// IAPHelper.h// airplay//// Created by apple on 13-10-23.// Copyright (c) 2013年 itcast. All rights reserved.//#import typedef void (...
阅读全文
摘要:_loginBtn = [[UIButton alloc]initWithFrame:CGRectMake(iconX, CGRectGetMaxY(passwordBGView.frame)+25, 280, 35)];[_loginBtn setTitle:@"进入游戏\nSTART GAME"...
阅读全文
摘要:-(void)upload{ AFHTTPRequestOperationManager *manager = [AFHTTPRequestOperationManager manager]; NSDictionary *params = @{@"deviceName":@"imageN...
阅读全文
摘要:解决方式1:self.tableView.tableHeaderView = [[UIView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, self.tableView.bounds.size.width, 0.01f)];解决方式2:self.table...
阅读全文
摘要://通常用于删除缓存的时,计算缓存大小//单个文件的大小- (long long) fileSizeAtPath:(NSString*) filePath{ NSFileManager* manager = [NSFileManager defaultManager]; if ([man...
阅读全文
摘要:一,x264库的编译 首先到http://www.videolan.org/developers/x264.html下载x264的库,然后解压,修改文件夹名称为x264 二,下载ffmpeg2.x http://ffmpeg.org/releases/ 例如:http://ffmpeg.org/re
阅读全文
摘要:解决方案:将Mysql的编码从utf8转换成utf8mb4。需要 >= MySQL 5.5.3版本、从库也必须是5.5的了、低版本不支持这个字符集、复制报错停止MySQL Server服务修改 my.cnf或者mysql.ini[client]default-character-set = utf8...
阅读全文
摘要:1.停止MySQL的服务sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop2.cd /usr/local/mysql/bin./mysqld_safe --skip-grant-table3.新开个终端也是进入到mysql/bin目录./mysql -...
阅读全文
摘要:1.不要同时开太多的线程(1~3条线程即可,不要超过5条)2.线程概念1> 主线程 : UI线程,显示、刷新UI界面,处理UI控件的事件2> 子线程 : 后台线程,异步线程3.不要把耗时的操作放在主线程,要放在子线程中执行一、NSThread(掌握)1.创建和启动线程的3种方式1> 先创建,后启动/...
阅读全文
摘要:extern(外部)1.对函数 完整的定义一个外部函数(可以省略extern) 完整的声明一个外部函数(可以省略extern)2.对变量 只能声明一个外部变量(不能省略extern) 在函数里面定义extern的变量表示应用程序中其他地方的变量(引用某个全局变量,并非定义)static(内部...
阅读全文
浙公网安备 33010602011771号