BookmarksPlist 是一个 NSMutableArray,它作为字典存储在 Plist 文件中。以下代码...
bookmarks = [[NSMutableArray alloc] init];
NSLog(@"BOOKMARKPLIST ----==== %@", BookmarksPlist);
[bookmarks addObjectsFromArray:BookmarksPlist];
NSLog(@"BOOKMARK ----==== %@", bookmarks);
...产生:
2012-11-27 11:34:33.592 BOOKMARKPLIST ----==== {
01Otabkey14tabkey1 = "Genesis 14";
01Otabkey8tabkey1 = "Genesis 8";
01Otabkey9tabkey1 = "Genesis 9";
}
2012-11-27 11:34:33.592 *** -[NSMutableArray addObjectsFromArray:]: array argument is not an NSArray
2012-11-27 11:34:33.593 BOOKMARK ----==== (
01Otabkey8tabkey1,
01Otabkey9tabkey1,
01Otabkey14tabkey1
)
所以问题是如何让书签数组获取 BookmarksPlist 数组的值而不是键?所以它看起来像这样:
2012-11-27 11:34:33.593 BOOKMARK ----==== (
"Genesis 14",
"Genesis 8",
"Genesis 9"
)