我想從plist文件到的UIImageView顯示各種圖像加載圖像,我寫我的代碼是這樣的:的iOS:從plist文件
NSDictionary *picturesDictionary = [NSDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Photos" ofType:@"plist"]];
imageArray = [picturesDictionary objectForKey:@"PhotosArray"];
PhotosInAlbum.image = [UIImage imageWithContentsOfFile:[imageArray objectAtIndex:1]];
但實際上什麼也沒有發生,我的ImageView的是空的!我也有兩個按鈕來轉發後面的圖像。
plist中的內容:
你能顯示.plist的內容嗎? – samfisher
@samfisher檢查我編輯的問題 –
'[PhotosInAlbum發佈];'..但是'alloc'在哪裏? – Kjuly