摘要: ObjC(Category of NSString): Swift(Extension of NSString): 阅读全文
posted @ 2017-02-20 11:57 Ficow 阅读(1633) 评论(0) 推荐(0) 编辑
摘要: 1.安装 Mac下好用的HTTP/HTTPS抓包工具Charles,到官网http://www.charlesproxy.com/可下载到最新版本(若不支持rMBP可拖到Retinizer中把文字变清晰) 2.获取Mac的IP 打开Charles程序 ,查看Mac电脑的IP地址(Help - Loc 阅读全文
posted @ 2016-10-19 20:50 Ficow 阅读(339) 评论(0) 推荐(0) 编辑
摘要: 当一个UITabbarController管理多个UINavigationController的时候, 我们要从这每一个UINavigationController中push一个ViewController, 如果不作处理,就会出现推出来的ViewController同样会显示TabBar。 去除方 阅读全文
posted @ 2016-10-11 00:19 Ficow 阅读(4573) 评论(0) 推荐(0) 编辑
摘要: 将箭头指向部分替换为编译器报错的内容即可。 参考文章:https://www.experts-exchange.com/questions/28238490/C-help-needed-Current-thread-must-be-set-to-single-thread-apartment-STA 阅读全文
posted @ 2016-10-10 10:38 Ficow 阅读(987) 评论(0) 推荐(0) 编辑
摘要: http://blog.csdn.net/wahaha13168/article/details/52703030 阅读全文
posted @ 2016-10-09 20:25 Ficow 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 找到Xcode项目文件.xcodeproj,查看包内容。 里面有project.pbxproj,用文本编辑器打开。 找到类似如下内容段: 阅读全文
posted @ 2016-10-08 15:09 Ficow 阅读(946) 评论(0) 推荐(0) 编辑
摘要: 通过实例讲解,如图(三个深灰色按钮处于同一个contentView中): 悬浮的三个按钮下方有一个可以点击的灰色区域,但是点击按钮之间的透明区域, 这三个按钮的contentView会响应这个点击事件,这时候需要让这个contentView不响应这个点击事件。 解决方法如下(将此方法增加到这个con 阅读全文
posted @ 2016-10-07 17:08 Ficow 阅读(14517) 评论(0) 推荐(0) 编辑
摘要: 按照以下内容设置即可: 阅读全文
posted @ 2016-09-16 09:38 Ficow 阅读(218) 评论(0) 推荐(0) 编辑
摘要: 当你发现你的Mac或者mbp不能输入波浪线 , 输出的都是的时候,检查一下这个选项(如下图所示)有没有选中。 如果没有,就勾上它! 阅读全文
posted @ 2016-08-31 15:15 Ficow 阅读(2560) 评论(0) 推荐(0) 编辑
摘要: 参考资料:http://stackoverflow.com/questions/38947101/what-is-the-open-keyword-in-swift 阅读全文
posted @ 2016-08-27 14:35 Ficow 阅读(254) 评论(0) 推荐(0) 编辑
摘要: 这是一幅很形象的图 : BaaS(Backend as a Service): 后端即服务。公司为移动应用开发者提供整合云后端的边界服务。随着移动互联网的发展,移动行业的分工也会像其它行业一样逐渐细化,后端服务就是这样被抽象出来,它统一向开发者提供文件存储、数据存储、推送服务等实现难度较高的功能,以 阅读全文
posted @ 2016-08-26 23:55 Ficow 阅读(1056) 评论(0) 推荐(0) 编辑
摘要: NSStringFromSelector(_cmd); // Objective-C print(__FUNCTION__) // Swift 2 print(#function) // Swift 3__FILE__, __LINE__, __COLUMN__ and __FUNCTION__ = 阅读全文
posted @ 2016-08-23 12:06 Ficow 阅读(1939) 评论(0) 推荐(0) 编辑
摘要: 平时工作,搜索引擎是少不了的,作为程序员,当然首推 Google。这里简单介绍下几个 Google 搜索的小技巧,方便别人也方便自己查阅。 ps:以下所有操作,均可以在 「谷歌搜索首页 -> 设置 -> 高级搜索」 中找到相应选项,感谢 Sevenboy 指出~ 关键词搜索 实例:韩子迟,韩子迟 数 阅读全文
posted @ 2016-08-23 10:13 Ficow 阅读(367) 评论(0) 推荐(0) 编辑
摘要: Markdown 语法说明 阅读全文
posted @ 2016-08-22 11:50 Ficow 阅读(1449) 评论(0) 推荐(0) 编辑
摘要: 参考文章:http://stackoverflow.com/questions/3410777/how-can-i-programmatically-force-stop-scrolling-in-a-uiscrollview 阅读全文
posted @ 2016-08-22 01:03 Ficow 阅读(933) 评论(0) 推荐(0) 编辑
摘要: self.automaticallyAdjustsScrollViewInsets = NO; //在当前VC内修改这个属性就可以解决这个问题了。 当前以TableView为主View的ViewController,在设置TableView的Inset的时候,会遇到一个问题。(我就被这问题给困住了蛮 阅读全文
posted @ 2016-08-20 11:03 Ficow 阅读(361) 评论(0) 推荐(0) 编辑
摘要: 1.切割圆角图片 2.图片文件格式判断 阅读全文
posted @ 2016-08-20 10:32 Ficow 阅读(546) 评论(0) 推荐(0) 编辑
摘要: 当tableView.scrollsToTop=YES不管用时,可以使用以下方法实现点击状态栏使tableView滚动到顶部。 参考地址:http://stackoverflow.com/questions/3753097/how-to-detect-touches-in-status-bar 阅读全文
posted @ 2016-08-19 23:28 Ficow 阅读(2508) 评论(0) 推荐(0) 编辑
摘要: iOS APP编译后,除了一些资源文件,剩下的就是一个可执行文件,有时候项目大了,引入的库多了,可执行文件很大,想知道这个可执行文件的构成是怎样,里面的内容都是些什么,哪些库占用空间较高,可以用以下方法勘察: 1.XCode开启编译选项Write Link Map File XCode -> Pro 阅读全文
posted @ 2016-08-18 17:24 Ficow 阅读(368) 评论(0) 推荐(0) 编辑
摘要: 编译选项 1.编译器优化级别 Build Settings->Optimization Level有几个编译优化选项,release版应该选择Fastest, Smalllest,这个选项会开启那些不增加代码大小的全部优化,并让可执行文件尽可能小。 2.去除符号信息 Strip Linked Pro 阅读全文
posted @ 2016-08-18 17:22 Ficow 阅读(343) 评论(0) 推荐(0) 编辑
摘要: 1、#import和#include的区别,@class代表什么? 2、浅拷贝和深拷贝区别是什么? 3、Objective-C中类别和类扩展的区别? 4、Objective-C堆和栈的区别? 5、内存管理的几个原则是什么? 6、NSMuatableArray *array = [NSMuatable 阅读全文
posted @ 2016-08-18 17:16 Ficow 阅读(262) 评论(0) 推荐(0) 编辑
摘要: 一、第三方类库 1:基于响应式编程思想的oc地址:https://github.com/ReactiveCocoa/ReactiveCocoa2:hud提示框地址:https://github.com/jdg/MBProgressHUD3:XML/HTML解析地址:https://github.co 阅读全文
posted @ 2016-08-18 17:11 Ficow 阅读(1521) 评论(0) 推荐(0) 编辑
摘要: 第一种方式(CGAffineTransform): 通过CGAffineTransformMakeTranslation方法来临时改变位置,然后通过CGAffineTransformIdentity恢复位置; 如果需要加动画,直接放在UIView的animation的block里就可以了。 第二种方 阅读全文
posted @ 2016-08-18 16:30 Ficow 阅读(1812) 评论(0) 推荐(0) 编辑
摘要: +(UIColor *)colorWithR:(CGFloat)r g:(CGFloat)g b:(CGFloat)b a:(CGFloat)a{ return [UIColor colorWithRed:r/255.0f green:g/255.0f blue:b/255.0f alpha:a/100.0f]; } + (UIColor *)colorWithHexSt... 阅读全文
posted @ 2016-08-18 10:16 Ficow 阅读(641) 评论(0) 推荐(0) 编辑
摘要: 1:应用启动时间 应用启动时,只加载启动相关的资源和必须在启动时加载的资源。 2:本地图片加载方式 本地图片加载常用方法有两种: a. [UIImage imageNamed:@"xx.png"] 图片多次使用时使用,需要使用此方式加入缓存 b. [[UIImage alloc] initWithContentsOfFile :@"xx.png"] 图片不常使用时,... 阅读全文
posted @ 2016-08-18 10:12 Ficow 阅读(194) 评论(0) 推荐(0) 编辑
摘要: //1 swap(&arr[fromIndexPath.row], &arr[to.row]) //2 (arr[fromIndexPath.row],arr[to.row]) = (arr[to.row],arr[fromIndexPath.row]) 阅读全文
posted @ 2016-08-16 18:15 Ficow 阅读(2348) 评论(0) 推荐(0) 编辑
摘要: Given an entity with an attribute firstName, Core Data automatically generates firstName, setFirstName:, primitiveFirstName, and setPrimitiveFirstName 阅读全文
posted @ 2016-08-10 16:40 Ficow 阅读(242) 评论(0) 推荐(1) 编辑
摘要: 这是苹果官方最后一次更新的基于OC的iOS开发基础教程, 如果英文的看不懂,还有中文的版本哦。 点击下面的链接 好东西,分享给大家! 如果确实有帮到你,麻烦star一下我的github吧! 阅读全文
posted @ 2016-08-09 15:55 Ficow 阅读(599) 评论(0) 推荐(0) 编辑
摘要: 1.代理传值 2.AppDelegate传值 3.block传值 4.通知传值 5.NSUserDefault传值 阅读全文
posted @ 2016-08-09 01:45 Ficow 阅读(208) 评论(0) 推荐(0) 编辑
摘要: http://www.2cto.com/kf/201504/395034.html http://www.cocoachina.com/ios/20150227/11202.html 阅读全文
posted @ 2016-08-08 23:41 Ficow 阅读(193) 评论(0) 推荐(0) 编辑
摘要: 1.创建可修改的数据库文件 2.初始化数据库 3.查询 4.关闭数据库 阅读全文
posted @ 2016-07-31 07:59 Ficow 阅读(314) 评论(0) 推荐(0) 编辑
摘要: 使用 ListBox.Items.Add 方法添加项时,可以使用 BeginUpdate 方法,以防止每次向列表添加项时控件都重新绘制 ListBox。完成向列表添加项的任务后,调用 EndUpdate 方法来使 ListBox 能够重新绘制。当向列表添加大量的项时,使用这种方法添加项可以防止绘制 阅读全文
posted @ 2016-07-29 21:31 Ficow 阅读(4286) 评论(0) 推荐(0) 编辑
摘要: 1.文本文件读写 2.二进制文件读写 阅读全文
posted @ 2016-07-28 22:23 Ficow 阅读(274) 评论(0) 推荐(0) 编辑
摘要: // 为键盘添加隐藏按钮 UIToolbar * backView = [[UIToolbar alloc]initWithFrame:CGRectMake(0, 0, 320, 30)]; [backView setBarStyle:UIBarStyleDefault]; UIBarButtonItem * btnSpace = [[UIBarBu... 阅读全文
posted @ 2016-07-16 02:18 Ficow 阅读(657) 评论(0) 推荐(0) 编辑
摘要: 在python3.4中,原来的tkMessageBox变成tkinter.messagebox,使用方式如下: tkinter.messagebox中有如下函数: askokcancel(title=None, message=None, **options) Ask if operation sh 阅读全文
posted @ 2016-07-15 18:31 Ficow 阅读(429) 评论(0) 推荐(0) 编辑
摘要: 以下运行结果均通过Python3.5版本实测! 1.列表转换为字典 输出结果:{1: 2, 'c': 'd', 'a': 'b'} dict([])中的列表元素就是这些列表,如上文的a b c,这些列表只能包含2个值,前面的会被转换为字典的key,后面的会被转换为字典里的value。 2.逆序字符串 阅读全文
posted @ 2016-07-15 16:48 Ficow 阅读(213) 评论(0) 推荐(0) 编辑
摘要: #import //延迟执行,delayFunc函数即为延迟执行的函数 #define onExit\ __strong void (^block)() __attribute__((cleanup(delayFunc),unused)) = ^ void delayFunc(__strong void (^*block)()){ (*block)(); } /... 阅读全文
posted @ 2016-06-30 22:33 Ficow 阅读(295) 评论(0) 推荐(0) 编辑
摘要: 看了几篇关于链式编程的文章,还是理解的不透彻,我想这可能是因为我自己对block掌握的不熟练。 我已经明白了,所以,和大家分享一下我的理解!如有问题,麻烦大家指出! 直接看代码吧!关键的注释都有。 我自己运行过,可以正常运行!(控制台代码) 原创文章,转载请注明出处!谢谢合作! 比较有价值的参考资料 阅读全文
posted @ 2016-06-28 16:53 Ficow 阅读(256) 评论(0) 推荐(0) 编辑
摘要: OS X El Capitan 新特性(System Integrity Protection or SIP)中加强了权限,但是可以对这里进行操作 /usr/local/bin 可以尝试使用以下指令进行jekyll的安装(亲测可行,安装完毕后terminal中输入jekyll即可看到是否生效): 这 阅读全文
posted @ 2016-06-19 09:02 Ficow 阅读(641) 评论(0) 推荐(0) 编辑
摘要: 本人用AppleScript成功实现了打开锐捷app,并且在用户验证框输入我的用户密码,然后强制退出锐捷。(至于为什么这么做呢?用校园网的痛苦,一言难尽啊!) 学习以下内容,首先你要自行百度资料来学习一点内容,学会使用实用工具里面的 脚本编辑器 和 Automator。实用工具,确实很实用啊! 这里 阅读全文
posted @ 2016-06-11 10:50 Ficow 阅读(18684) 评论(3) 推荐(1) 编辑