很抱歉,如果以前曾多次问过这个问题,但似乎对我的问题没有任何帮助。
我已将我的应用程序设置为从应用程序本身内部完美读取本地 .plist 文件以进行测试,但要使该应用程序有任何用途,我需要能够在 Web 服务器上更新它并远程加载它.
这是我当前的本地 plist 代码。我将如何在应用程序的其他地方进行最小的更改来修改它?
提前谢谢了。
- (void)viewDidLoad
{
[super viewDidLoad];
//Create a dictionary with the contents of Squad.plist
NSDictionary *dictionary = [[NSDictionary alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Squad" ofType:@"plist"]];
//Fill the Squad array with contents of dictionary under the key "Players"
[self setSquad:(NSArray*) [dictionary objectForKey:@"Players"]];
//Reload the table data
[[self tableView] reloadData];
[[self navigationItem] setPrompt:nil];
}