Advertisement
IaroslavDenisenko

Untitled

Feb 24th, 2020
623
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  2.    
  3.     int studentsCount = 15;
  4.    
  5.     NSMutableDictionary *students = [NSMutableDictionary dictionary];
  6.    
  7.     for (int i = 0; i < studentsCount; i++) {
  8.        
  9.         Student *student = [Student randomStudent];
  10.        
  11.         NSString *key = [student.firstName stringByAppendingString:student.lastName];
  12.        
  13.         [students setObject:student forKey:key];
  14.        
  15.         [student release];
  16.        
  17.     }
  18.    
  19.     NSLog(@"%@", students);
  20.    
  21.     return YES;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement