0
我正在做一个应用程序,其中有几个短语存储在数组plist中,我可以在这些句子之间导航,使用按钮返回上一个或下一个可以使用plist,我会喜欢帮忙!谢谢。在plist之间导航句子!
NSMutableArray *dictDitados;
NSString *path = [[NSBundle mainBundle] bundlePath];
NSString *finalPath = [path stringByAppendingPathComponent:@"Ditados.plist"];
NSDictionary *plistData = [[NSDictionary dictionaryWithContentsOfFile:finalPath] retain];
NSDictionary *ditados = [plistData objectForKey:@"Sentences"];
NSMutableArray *selection = [[ditados objectForKey:@"phrases"] mutableCopy];
// Select and display currently selected record from the array.
dictDitados = [selection objectAtIndex:0];