UITableView去掉section的header的粘性
摘要:思路:若header的高度为25,在滑动的时候将scrollView的内容偏移量上衣25,其实他还是粘在上面只不过我们看不到他了。 /// 用于判断往上滑还是往下滑 var deltaY:CGFloat = -111 func scrollViewWillEndDragging(scrollView
阅读全文
swift 闭包循环引用
摘要:当使用闭包时,类本身持有self,然后又在闭包中访问了self或者self的属性,就会导致恶心额循环引用。swift提供的解决方法是在闭包中定义捕获列表,捕获列表是闭包想怎么引用捕获来的变量。例如下面定义了一个捕获列表,引用self为unowned引用,这样在宾傲中用self就不会导致循环引用 去掉
阅读全文
AFNetworking3.0使用
摘要:AFHTTPSessionManager:根据这个对象可以对请求千设置一些参数和状态//得到一个session manager AFHTTPSessionManager *manager = [AFHTTPSessionManager manager]; NSOperation...
阅读全文
IOS线程学习(一)
摘要:1.NSThread 官方的描述 An NSThread object controls a thread of execution. Use this class when you want to have an Objective-C method run in its own thread o
阅读全文
CIImage实现滤镜效果
摘要:Core Image also provides autoadjustment methods that analyze an image for common deficiencies and return a set of filters to correct those deficiencie...
阅读全文
UIImage学习
摘要:UIImage AUIImageobject is a high-level way to display image data. You can create images from files, from Quartz image objects, or from raw image dat...
阅读全文