入门客AI创业平台(我带你入门,你带我飞行)
博文笔记

objective-c数组的四种遍历方法总结

创建时间:2013-11-03 投稿人: 浏览次数:15295

 objective-c 语言 数组遍历的4种方式:1、普通for循环;2、快速for循环;3、特性block方法;4、枚举方法。

Blog类:

01 #import "Blog.h"
02 @implementation Blog
03  
04 +(Blog *)blog{
05     Blog * blog = [[Blog alloc] init];
06     return blog;
07 }
08  
09 -(Blog *)setBlogTitle:(NSString *)title andContent:(NSString *)content{
10     _title = title;
11     _content = content;
12     return self;
13 }
14  
15 -(NSString *)description{
16     return [NSString stringWithFormat:@"blog : title is "%@" , and content is "%@"", _title,_content ];
1
声明:该文观点仅代表作者本人,入门客AI创业平台信息发布平台仅提供信息存储空间服务,如有疑问请联系rumenke@qq.com。
  • 上一篇:没有了
  • 下一篇:没有了
未上传头像