在 PhotoScroller 示例中填充 ImageData.plist
我对 iPhone 应用程序开发还很陌生,我需要你的帮助。我正在尝试填充 Apple 的 PhotoScroller 示例中的 imageData.plist< /a> 包含我自己的图像,您能否指导我如何根据完整图像文件夹中的所有图像以编程方式填充此 plist 文件?我面临的另一个挑战是,可以随时将任意数量的未知图像放入文件夹中。下面是 plist 文件的快照。
plist 表的定义
Item 0 Dictionary (3 items)
height Number 400
width Number 290
name string Lake
Item 1 Dictionary (3 items)
height Number 400
width Number 290
name string Tree
Item 2 Dictionary (3 items)
height Number 400
width Number 290
name string Shed
Item 3 Dictionary (3 items)
height Number 400
width Number 290
name string Rock
我知道我必须使用 NSDictionary 类和 writeToFile 来实现此目的,但如何实现此目的我需要帮助。
I am still fairly new to iPhone app development and I need your help. I am trying to populate the imageData.plist in Apple's PhotoScroller example with images of my own, can you please guide me on how to populate this plist file programmatically, based on all the images in the full images folder? The other challenge I have is that any number of unknown images could be placed inside the folder at any time. Below is a snapshot of the plist file.
Definition of plist table
Item 0 Dictionary (3 items)
height Number 400
width Number 290
name string Lake
Item 1 Dictionary (3 items)
height Number 400
width Number 290
name string Tree
Item 2 Dictionary (3 items)
height Number 400
width Number 290
name string Shed
Item 3 Dictionary (3 items)
height Number 400
width Number 290
name string Rock
I know that I have to use NSDictionary class and writeToFile to achieve this, but how to go about this I need help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
NSDictionary 数组?
An array of NSDictionarys?