Iphone SDK 帮助我请求仅显示数据 plist 中的一个类别!
我寻找一个可以长期帮助我的朋友! 我是初学者,我试图理解...我如何提出请求以显示同一类别(不是全部!)中的所有数据(来自 plist),例如:仅显示电影有:流派 = Action
请帮助我。 .. 多谢 ! 请原谅我的英语不好!
是在这段代码中我必须制作它还是其他代码???
- (id)initWithLibraryName:(NSString *)libraryName { if (self = [超级初始化]) { 库Plist = 库名称; libraryContent = [[NSArray alloc] initWithContentsOfFile:[[NSBundle mainBundle] pathForResource:libraryPlist ofType:@"plist"]];
您可以在以下位置下载帮助我的源代码: http:// www.iphonedevcentral.com/wp-content/uploads/2009/08/MyDVDLibrary03.zip 请告诉我我该怎么做!
我想知道确切的代码行以及我必须在哪里写它! 要查看正在运行的产品列表。
非常非常感谢
I look for a friends who can help me for long time !
I'm beginner and I try to understand... HOW I can make a request to show all data (from plist) in SAME category (NOT ALL !) for exemple : show only the movie have : genre = Action
Please help me ...
Thanks a lot !
Excuse my bad english !
Is it in this code I must make it or an other ???
- (id)initWithLibraryName:(NSString *)libraryName {
if (self = [super init]) {
libraryPlist = libraryName;
libraryContent = [[NSArray alloc] initWithContentsOfFile:[[NSBundle mainBundle]
pathForResource:libraryPlist ofType:@"plist"]];
you can download the source for help me on : http://www.iphonedevcentral.com/wp-content/uploads/2009/08/MyDVDLibrary03.zip PLEASE SAY ME HOW I CAN DO IT !
I will want to know the exact CODE LINE and WHERE I must write it !
For see a the list of product are in Action.
THANKS VERY VERY MUCH
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不会下载示例项目并为您浏览代码,但您想要做的是使用 NSArray 的 FilteredArrayWithPredicate 方法来过滤
libraryContent
中的对象。 这是一个关于使用谓词的相当不错的教程 。I'm not going to download the sample project and go through the code for you, but you want to do is use NSArray's filteredArrayWithPredicate method to filter the objects in
libraryContent
. This is a pretty decent tutorial for using predicates.