ios 數組倒序和數組轉字符串

  NSMutableArray *array = [NSMutableArray arrayWithObjects:@"1",@"2",@"3",nil];
    NSArray* reversedArray = [[array reverseObjectEnumerator] allObjects];
    NSLog(@"%@",reversedArray);
    
    NSArray *array1 = [NSArray arrayWithObjects:@"one",@"two",@"three", nil];
    NSString *string = [array1 componentsJoinedByString:@","];
    NSLog(@"string:%@",string);
相關文章
相關標籤/搜索