我正在尝试将一些 XML 数据解析为一个数组,然后在第一个视图控制器的表视图中显示该数组。可以看到我已经把数据解析成我需要的了,然后就全部设置在数组中了。我只是不知道如何让它发送到 GUI 中的表视图。这是我的数组:
NSString* mountPoint1 = [mountArray objectAtIndex: 11];
NSString* mountPoint2 = [mountArray objectAtIndex: 17];
NSString* mountPoint3 = [mountArray objectAtIndex: 23];
NSString* mountPoint4 = [mountArray objectAtIndex: 29];
NSString* currentSong1 = [mountArray objectAtIndex: 16];
NSString* currentSong2 = [mountArray objectAtIndex: 22];
NSString* currentSong3 = [mountArray objectAtIndex: 28];
NSString* currentSong4 = [mountArray objectAtIndex: 34];
NSString* listeners1 = [mountArray objectAtIndex: 14];
NSString* listeners2 = [mountArray objectAtIndex: 20];
NSString* listeners3 = [mountArray objectAtIndex: 26];
NSString* listeners4 = [mountArray objectAtIndex: 32];
NSLog(@"mountpoint1 should be dev = %@", mountPoint1);
NSLog(@"All data = %@", mountArray);
// First mount is 11
NSLog(@"First mount point = %@", mountPoint1);
NSLog(@"Currrent Song playing on mount Dev = %@", currentSong1);
NSLog(@"Currrent listeners on mount Dev = %@", listeners1);
NSLog(@"Second mount point = %@", mountPoint2);
NSLog(@"Currrent Song playing on mount Metal = %@", currentSong2);
NSLog(@"Currrent listeners on mount Metal = %@", listeners2);
NSLog(@"Third mount point = %@", mountPoint3);
NSLog(@"Currrent Song playing on mount OrienLive = %@", currentSong3);
NSLog(@"Currrent listeners on mount OrienLive = %@", listeners3);
NSLog(@"Fourth mount point = %@", mountPoint4);
NSLog(@"Currrent Song playing on mount Rock = %@", currentSong4);
NSLog(@"Currrent listeners on mount Rock = %@", listeners4);