- (NSMutableArray *)messageArray{
if (_messageArray == nil) {
NSString *path = [[NSBundle mainBundle] pathForResource:@"messages.plist" ofType:nil];
NSArray *dictArr = [NSArray arrayWithContentsOfFile:path];
NSMutableArray *messageFrameArr = [NSMutableArray array];
for (NSDictionary *dict in dictArr) {
WFMessages *message = [WFMessages messagesWithDict:dict];
[messageFrameArr addObject:message];
}
_messageArray = messageFrameArr;
}
return _messageArray;
}
通过上面程序对数据进行懒加载
关于在IOS开发中数据懒加载相关
最新推荐文章于 2023-07-24 12:55:06 发布