I am forced to use an NSMutableArray and populate it using a loop:
- (instancetype)initWith:(NSUInteger)capacity rolling:(BOOL)rolling {
_list = [NSMutableArray arrayWithCapacity:capacity];
// Populate the array with all NSNull values.
for (NSUInteger i = 0; i < capacity; i++)
[_list addObject:NSNull.null];
}
Topic:
Programming Languages
SubTopic:
General
Tags: