iOS __attribute__((constructor))

摘要: iOS里面测试几个函数 __attribute__((constructor)) static void startup() { printf("startup xxx \n"); } __attribute__((destructor)) static void finishup() { prin 阅读全文
posted @ 2016-10-02 15:29 wxm5558 阅读(608) 评论(0) 推荐(0) 编辑

git 问题记录

摘要: error: bad signature fatal: index file corrupt 处理方法: 在执行commit或revert等操作时,提示“bad index file sha1 signature fatal: index file corrupt”错误,导致操作失败。这是由于git 阅读全文
posted @ 2016-09-18 16:16 wxm5558 阅读(156) 评论(0) 推荐(0) 编辑

cocoapod入门级使用

摘要: 参考这里的文章 http://code4app.com/article/cocoapods-install-usage 阅读全文
posted @ 2016-09-13 22:54 wxm5558 阅读(110) 评论(0) 推荐(0) 编辑

cocoapod使用日记

摘要: 如果被强了,换到taobao镜像 重新安装 如果安装的时候出现错误: sudo gem install -n /usr/local/bin cocoapods 安装成功后,可以正常使用cocoapods 阅读全文
posted @ 2016-09-13 22:42 wxm5558 阅读(88) 评论(0) 推荐(0) 编辑

iOS sqlite查询当天日期的数据

摘要: } NSString*timeFormat = @"%Y-%m-%d"; NSString * sql = [NSString stringWithFormat:@"select * from T_TRAVEL_EXPENSE_RETURNTRIP wherestrftime('%@','now') = strftime('%@',SRV_DATE) and USER_ID... 阅读全文
posted @ 2016-08-28 23:01 wxm5558 阅读(904) 评论(0) 推荐(0) 编辑

iOS动态的创建类

摘要: 主要是两个函数objc_allocateClassPair函数,以及objc_registerClassPair函数,前者创建指定父类,后者注册 阅读全文
posted @ 2016-08-25 23:36 wxm5558 阅读(406) 评论(0) 推荐(0) 编辑

iOS Objc和swift互相调用

摘要: 新建一个objectivec工程 新建一个swift文件,提示要不要建一个bridge文件选择是 buildsettings里面enable swift 然后新建一个oc的类 这里头文件里面有个 左边是工程名,右边是Swift #import "工程名-Swift.h" 在swift文件里面加入代码 阅读全文
posted @ 2016-07-22 16:29 wxm5558 阅读(323) 评论(0) 推荐(0) 编辑

iOS阳历转阴历的一个demo

摘要: 最近项目开发过程中,涉及到阳历转阴历 于是自己写了一个 测试在闰年和非闰年情况都正常 阅读全文
posted @ 2016-07-07 18:43 wxm5558 阅读(221) 评论(0) 推荐(0) 编辑

iOS为UIView的子类添加渐变颜色

摘要: 比如给一个UILabel设置了渐变颜色的效果 设置渐变背景色 设置简便字体色 阅读全文
posted @ 2016-06-08 19:38 wxm5558 阅读(418) 评论(0) 推荐(0) 编辑

npm安装node.js最新版本

摘要: sudo npm cache clean -f sudo npm install -g n sudo n stable参考:http://stackoverflow.com/questions/11284634/upgrade-nodejs-to-the-latest-version-on-mac- 阅读全文
posted @ 2016-06-05 22:42 wxm5558 阅读(258) 评论(0) 推荐(0) 编辑