#import <Foundation/Foundation.h>

@interface LRItem : NSObject

@property (nonatomic, copy)NSString *name;

@property (nonatomic, strong)Class clas;

+ (instancetype)itemWithName:(NSString *)name class:(Class)clas;

@end
Copy the code
#import "LRItem.h" @implementation LRItem + (instancetype)itemWithName:(NSString *)name class:(Class)clas { LRItem *item  = [[self alloc] init]; item.name = name; item.clas = clas; return item; } @endCopy the code
-(void) prepareDemoData { demoData = [NSMutableArray array]; NSArray * from = @[ @"Vincent", @"Mr Glass", @"Marsellus", @"Ringo", @"Sullivan", @"Mr Wolf", @"Butch Coolidge", @"Marvin", @"Captain Koons", @"Jules", @"Jimmie Dimmick" ]; NSArray * subjects = @[ @"You think water moves fast?", @"They called me Mr Glass", @"The path of the righteous man", @"Do you see any Teletubbies in here?", @"Now that we know who you are", @"My money's in that office, right?", @"Now we took an oath", @"That show's called a pilot", @"I know who I am. I'm not a mistake", @"It all makes sense! ", @"The selfish and the tyranny of evil men", ]; NSArray * messages = @[ @"You should see ice. It moves like it has a mind. Like it knows it killed the world once and got a taste for murder. After the avalanche, it took us a week to climb out.", @"And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy My brothers.", @"Look, just because I don't be givin' no man a foot massage don't make it right for Marsellus to throw Antwone into a glass motherfuckin' house", @"No? Well, that's what you see at a toy store. And you must think you're in a toy store, because you're here shopping for an infant named Jeb.", @"In a comic, you know how you can tell who the arch-villain's going to be? He's the exact opposite of the hero", @"If she start giving me some bullshit about it ain't there, and we got to go someplace else and get it, I'm gonna shoot you in the head then and there.", @"that I'm breaking now. We said we'd say it was the snow that killed the other two, but it wasn't. Nature is lethal but it doesn't hold a candle to man.", @"Then they show that show to the people who make shows, and on the strength of that one show they decide if they're going to make more shows.", @"And most times they're friends, like you and me!  I should've known way back when...", @"After the avalanche, it took us a week to climb out. Now, I don't know exactly when we turned on each other, but I know that seven of us survived the slide", @"Blessed is he who, in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children", ]; for (int i = 0; i < messages.count; ++i) { MailData * mail = [[MailData alloc] init]; mail.from = [from objectAtIndex:i]; mail.subject = [subjects objectAtIndex:i]; mail.message = [messages objectAtIndex:i]; mail.date = [NSString stringWithFormat:@"11:%d", 43 - i]; [demoData addObject:mail]; }}Copy the code