![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Objective-C
文章平均质量分 83
程_先生
Any fool can write code that a computer can understand. Good programmers write code that humans can understand. –Martin Fowler
任何一个傻子都能写出让电脑能懂的代码,而只有好的程序员可以写出让人能看懂的代码 — Martin Fowler
展开
-
iOS OC07.2_类的扩展
类目//1.系统已经写好的类目:按照功能对系统的类方法进行区分 //leimucong@interface开始,后面是当前类的名字,类名后面是分类的功能,到@end结束 //2.我们创建的类目,一般是为了把系统的类进行功能扩充// NSString *str=@"2015-07-12 10:00:00"; // NSString *str2=@"2015-07-12 09原创 2015-07-25 14:44:54 · 568 阅读 · 0 评论 -
iOS OC07_NSDate
迭代器数组NSDictionary *dic=[NSDictionary dictionaryWithObjectsAndKeys:@"1",@"2",@"3",@"4", nil]; NSEnumerator *enumerator =[arr objectEnumerator]; NSString *str =nil; while (str=[enumerator nex原创 2015-07-23 19:16:56 · 625 阅读 · 1 评论 -
iOS OC06.2_字典
// // main.m // OC06_字典 // // Created by dllo on 15/7/21. // Copyright (c) 2015年 zhozhicheng. All rights reserved. // #import int main(int argc, const char * ar原创 2015-07-23 17:35:18 · 388 阅读 · 0 评论 -
iOS OC06_省市区字典数组
// // main.m // OC06_省市区字典数组 // // Created by dllo on 15/7/22. // Copyright (c) 2015年 zhozhicheng. All rights reserved. // #import int main(int argc, const char原创 2015-07-22 21:00:18 · 446 阅读 · 0 评论 -
iOS OC05.2_数组
// // Student.h // OC05_数组整理 // // Created by dllo on 15/7/21. // Copyright (c) 2015年 zhozhicheng. All rights reserved. // #import @interface Student : NSObject原创 2015-07-21 19:16:35 · 410 阅读 · 1 评论 -
iOS OC01_类和对象
.h // // Student.h // OC01_类和对象 // // Created by dllo on 15/7/15. // Copyright (c) 2015年 zhozhicheng. All rights reserved. // #import // @interface 接口文件,一个类的开始原创 2015-07-20 16:27:53 · 352 阅读 · 0 评论 -
iOS OC03_继承,便利构造器,初始化方法
// // Zombie.h // OC03_继承,便利构造器,初始化方法 // // Created by dllo on 15/7/16. // Copyright (c) 2015年 zhozhicheng. All rights reserved. // #import @interface Zombie :原创 2015-07-20 16:32:07 · 805 阅读 · 0 评论 -
iOS OC04_属性
// // Student.h // OC04_属性 // // Created by dllo on 15/7/17. // Copyright (c) 2015年 zhozhicheng. All rights reserved. // #import #import "Person.h" @interface Stude原创 2015-07-20 16:42:04 · 515 阅读 · 0 评论 -
iOS OC02_可见度,方法
.h // // Student.h // OC02_可见度,方法 // // Created by dllo on 15/7/16. // Copyright (c) 2015年 zhozhicheng. All rights reserved. // #import @interface Student :原创 2015-07-20 16:29:52 · 439 阅读 · 0 评论 -
iOS OC10_Block
内存五大区域 //栈 int a=10; NSLog(@"%p",a); //堆 int *p=malloc(40); NSLog(@"%p",p); //全局 static int b=10; NSLog(@"%p",b); //常量 char *str="iphone"; NSLog(@"%p",str原创 2015-07-28 19:42:32 · 534 阅读 · 0 评论 -
iOS OC08,09_内存管理
//管理内存有三种方式, //1.是垃圾回收,java常见的管理内存的方法,系统来检测对象是否被使用,是否被释放 //2.MRC手动管理引用计数,iOS管理内存的方式,程序员通过手动的方式来管理对象是否被释放 //3.ARC自动管理引用计数,基于MRC,系统自动的管理内存,以后我们还是先使用MRC,培养管理内存的习惯对象被创建出来之后他的引用计数retainCount就变成1原创 2015-07-27 19:18:53 · 574 阅读 · 2 评论 -
iOS OC05_NSString总结
// // main.m // OC05_NSString整理 // // Created by dllo on 15/7/20. // Copyright (c) 2015年 zhozhicheng. All rights reserved. // #import int main(int argc, const c原创 2015-07-20 19:15:38 · 535 阅读 · 2 评论