iOS中打乱数组的顺序
摘要:
实现NSMutableArray的分类,NSMutableArray+Shuffling.h@interface NSMutableArray (Shuffling)- (void)shuffle;@endNSMutableArray+Shuffling.m@implementation NSMutableArray (Shuffling)- (void)shuffle{ static BOOL seeded = NO; if(!seeded) { seeded = YES; srandom(time(NULL)); } NSUInt... 阅读全文
posted @ 2013-11-29 14:50 lonelysoul 阅读(338) 评论(0) 推荐(0) 编辑