Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在以下上下文中遇到了 @[]
self.searches = [@[] mutableCopy];
它是什么?
self.searches = [[NSArray array] mutableCopy];
这是一个数组文字。换句话说:[NSArray arrayWithObjects:nil]简而言之。您可以像这样在其中添加对象
[NSArray arrayWithObjects:nil]
NSArray *array = @[@"one", @"two"];