0
返回部分密鑰我有以下的方法,其讀取plist文件[見截圖附]並將其作爲一個可變的數組:arrayWithContentsOfFile用的plist上的5.1的iPad
+(NSMutableArray *)getSharersPlistArray:(NSString*)plist
{
NSString *AppDetailPlist = [[NSBundle mainBundle] pathForResource:plist ofType:@"plist"];
NSMutableArray* toReturn = [NSMutableArray arrayWithArray:[NSArray arrayWithContentsOfFile:AppDetailPlist]];
NSLog(@"toReturn:%@", toReturn);
return toReturn;
}
上這樣做的不完全的結果一臺iPad 1/5.1的iOS:
(
{
2 = {
image = "Icon-72.png";
name = Email;
type = ShareCell;
};
},
{
0 = {
image = "Icon-72.png";
name = Share;
type = ShareCell;
};
}
)
在上的5.1或6.0模擬器正確/完整的結果:
(
{
0 = {
image = "Icon-72.png";
name = Facebook;
type = ShareCell;
};
1 = {
image = "Icon-72.png";
name = Twitter;
type = ShareCell;
};
2 = {
image = "Icon-72.png";
name = Email;
type = ShareCell;
};
},
{
0 = {
image = "Icon-72.png";
name = Share;
type = ShareCell;
};
1 = {
image = "Icon-72.png";
name = Follow;
type = ShareCell;
};
}
)
我確認了plist,它看起來沒問題:
找不到。 -name'* plist'-exec plutil {} \;
./Share.plist:好的
任何想法爲什麼?我將不勝感激任何見解)
是的..這是我第一次嘗試,所以我做了很多次。但是這個問題似乎是一致的。謝謝塞爾吉奧。 – Zsolt
重新啓動設備,它現在似乎工作。真奇怪。 – Zsolt