Aryan Kashyap Aryan Kashyap - 5 months ago 7
Objective-C Question

Converting Swift Code to Objective - C

I am trying to convert the code below in objective c the code is basically a NSDictionary variable defines as an array.. its like a NSDictionary inside a NSArray..

var items = [NSDictionary]()

Answer

Simple as that:

NSArray <NSDictionary *> *items = @[@{}];

And if you want the array to be mutable:

NSMutableArray <NSDictionary *> *items = [NSMutableArray array];
Comments