随笔分类 -  iOS

摘要:通过实例讲解,如图(三个深灰色按钮处于同一个contentView中): 悬浮的三个按钮下方有一个可以点击的灰色区域,但是点击按钮之间的透明区域, 这三个按钮的contentView会响应这个点击事件,这时候需要让这个contentView不响应这个点击事件。 解决方法如下(将此方法增加到这个con 阅读全文
posted @ 2016-10-07 17:08 Ficow 阅读(14675) 评论(0) 推荐(0)
摘要:按照以下内容设置即可: 阅读全文
posted @ 2016-09-16 09:38 Ficow 阅读(226) 评论(0) 推荐(0)
摘要:参考资料:http://stackoverflow.com/questions/38947101/what-is-the-open-keyword-in-swift 阅读全文
posted @ 2016-08-27 14:35 Ficow 阅读(267) 评论(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 阅读(1960) 评论(0) 推荐(0)
摘要:参考文章:http://stackoverflow.com/questions/3410777/how-can-i-programmatically-force-stop-scrolling-in-a-uiscrollview 阅读全文
posted @ 2016-08-22 01:03 Ficow 阅读(950) 评论(0) 推荐(0)
摘要:self.automaticallyAdjustsScrollViewInsets = NO; //在当前VC内修改这个属性就可以解决这个问题了。 当前以TableView为主View的ViewController,在设置TableView的Inset的时候,会遇到一个问题。(我就被这问题给困住了蛮 阅读全文
posted @ 2016-08-20 11:03 Ficow 阅读(369) 评论(0) 推荐(0)
摘要:1.切割圆角图片 2.图片文件格式判断 阅读全文
posted @ 2016-08-20 10:32 Ficow 阅读(558) 评论(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 阅读(2544) 评论(0) 推荐(0)
摘要:iOS APP编译后,除了一些资源文件,剩下的就是一个可执行文件,有时候项目大了,引入的库多了,可执行文件很大,想知道这个可执行文件的构成是怎样,里面的内容都是些什么,哪些库占用空间较高,可以用以下方法勘察: 1.XCode开启编译选项Write Link Map File XCode -> Pro 阅读全文
posted @ 2016-08-18 17:24 Ficow 阅读(383) 评论(0) 推荐(0)
摘要:编译选项 1.编译器优化级别 Build Settings->Optimization Level有几个编译优化选项,release版应该选择Fastest, Smalllest,这个选项会开启那些不增加代码大小的全部优化,并让可执行文件尽可能小。 2.去除符号信息 Strip Linked Pro 阅读全文
posted @ 2016-08-18 17:22 Ficow 阅读(396) 评论(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 阅读(272) 评论(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 阅读(1537) 评论(0) 推荐(0)
摘要:第一种方式(CGAffineTransform): 通过CGAffineTransformMakeTranslation方法来临时改变位置,然后通过CGAffineTransformIdentity恢复位置; 如果需要加动画,直接放在UIView的animation的block里就可以了。 第二种方 阅读全文
posted @ 2016-08-18 16:30 Ficow 阅读(1845) 评论(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 阅读(652) 评论(0) 推荐(0)
摘要:1:应用启动时间 应用启动时,只加载启动相关的资源和必须在启动时加载的资源。 2:本地图片加载方式 本地图片加载常用方法有两种: a. [UIImage imageNamed:@"xx.png"] 图片多次使用时使用,需要使用此方式加入缓存 b. [[UIImage alloc] initWithContentsOfFile :@"xx.png"] 图片不常使用时,... 阅读全文
posted @ 2016-08-18 10:12 Ficow 阅读(204) 评论(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 阅读(2374) 评论(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 阅读(259) 评论(0) 推荐(1)
摘要:这是苹果官方最后一次更新的基于OC的iOS开发基础教程, 如果英文的看不懂,还有中文的版本哦。 点击下面的链接 好东西,分享给大家! 如果确实有帮到你,麻烦star一下我的github吧! 阅读全文
posted @ 2016-08-09 15:55 Ficow 阅读(610) 评论(0) 推荐(0)
摘要:1.代理传值 2.AppDelegate传值 3.block传值 4.通知传值 5.NSUserDefault传值 阅读全文
posted @ 2016-08-09 01:45 Ficow 阅读(217) 评论(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 阅读(205) 评论(0) 推荐(0)