我正在尝试将 plist 文件中的各种图像显示到 UIImageView 中,我编写了这样的代码:
NSDictionary *picturesDictionary = [NSDictionary dictionaryWithContentsOfFile:[[NSBundle mainBundle] pathForResource:@"Photos" ofType:@"plist"]];
imageArray = [picturesDictionary objectForKey:@"PhotosArray"];
PhotosInAlbum.image = [UIImage imageWithContentsOfFile:[imageArray objectAtIndex:1]];
但实际上什么也没发生,我的 ImageView 是空的!我还有两个按钮可以向前向后图像。
Plist的内容: