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];