Breaking News
Home / iOS / ObjectiveC / How to print NSMutableArray in Objective C?

How to print NSMutableArray in Objective C?

Solution

NSMutableArray array = nil;

array = [NSMutableArray arrayWithObjects:@”Hat”, @”Bat”, @”Mat” nil];

// method 1

NSLog(@”array: %@”, array);

// method2

for (id obj in array)
   NSLog(@”obj: %@”, obj);

[pb_builder]

Check Also

Singleton Example in Objective C?

Solution static MyManager *sharedManager = nil; +(MyManager*) sharedManager {         if (sharedManager == nil)         …

Advertisment ad adsense adlogger