ios instancetype 和 id 的异同
摘要:
1.0 相同点:都可以作为方法的返回类型2.0 不同点: a、instancetype 可以返回和方法所在类相同类型的对象 id 只能返回未知类型的对象 b、 instancetype 只能作为返回值,不能像id 那样作为参数在实际开发中,尽量使用 instancetype (当使用继承... 阅读全文
posted @ 2015-11-17 11:06 护舒宝 阅读(203) 评论(0) 推荐(0)
浙公网安备 33010602011771号