I have this objective-c code, but I cant find the size of the allocated array.
NSArray *myArray = [[NSArray alloc] initWithObjects:@"Apple", @"Orange", @"Banana", @"Plum", nil];
[myArray objectAtIndex: 0];
[myArray length];
XCode give-me this error:
“No visible @interface for “NSArray” declares the selector length”
What can this be?
What is length? If you want to find the number of objects in the array use:
If you want to find the size, check this link out:
Length of an Array in Objective C