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.
数组1:{A,B,C}数组2:{1,2,3}
我需要组合这个数组列表,如:
组合数组:{ A(1), B(2), C(3) }
我该如何实施?
您可以使用NSDictionary
NSDictionary
NSDictionary *dict = [NSDictionary dictionaryWithObjects:array1 forKeys:array2]; NSString *value = dict[@"1"]; //value = @"A";