ios中strong和weak的解释理解
摘要:来自stackoverflow解释的挺有意思的 Imagine our object is a dog, and that the dog wants to run away (be deallocated). Strong pointers are like a leash on the dog.
阅读全文
posted @
2015-04-12 21:48
wyx_cs
阅读(276)
推荐(0)
封装实现一个自己的tabbar
摘要:实现效果: 原来效果: 实现对应的思路有: 1.首先你要拥有这样的一个控件CSTabBar,继承自tabbar,这样才能做到重构(废话) 2.你要在使用CSTabBar使用kvc来实现 [self setValue:newTab forKey:@"tabBar"]; newTab是自己设定的对应的t
阅读全文
posted @
2015-04-12 16:39
wyx_cs
阅读(719)
推荐(0)
UIView常用的一些方法小记之setNeedsDisplay和setNeedsLayout
摘要:1,UIView的setNeedsDisplay和setNeedsLayout方法 首先两个方法都是异步执行的。而setNeedsDisplay会调用自动调用drawRect方法,这样可以拿到 UIGraphicsGetCurrentContext,就可以画画了。而setNeedsLayout会默认
阅读全文
posted @
2015-04-11 21:14
wyx_cs
阅读(116)
推荐(0)