2010-02-09 58 views

回答

0

这是一个非常普遍的问题。通过提出更具体的关于你想要完成的事情,你可能会得到更多的答案。开发人员比实现更多的是实现。也许你可以在这种情况下重新提出你的问题?我确信你有一些想法。为什么不分享他们?

0

感谢您的建议。 我有一个用xml文件填充的uisearchbar tableview。 上面的代码显示它与NSURL,但我不能用parseXMLFileAtURL做到这一点。

我发现一个很好的教程(法语)来解析XML文件,但我不能添加到它的搜索栏。 编号喜欢找到混合XML解析和搜索栏的教程。

谢谢

NSURL *url = [NSURL URLWithString:@"http://www.....fr/file.xml"]; 
NSArray *gamesToLiveInArray = [NSArray arrayWithContentsOfURL:url]; 
NSLog(@"%@", [gamesToLiveInArray description]); 


NSDictionary *gamesToLiveInDict = [NSDictionary dictionaryWithObject:gamesToLiveInArray forKey:@"title"]; 

[listOfItems addObject:gamesToLiveInDict]; 

//copy du tableau 
copyListOfItems = [[NSMutableArray alloc] init]; 

//titre 
self.navigationItem.title = @"Recherche"; 

//ajoute la searchbar 
self.tableView.tableHeaderView = searchBar; 
searchBar.autocorrectionType = UITextAutocorrectionTypeNo; 

searching = NO; 
letUserSelectRow = YES; 
+0

这就是你要以正确落得什么? http://www.iphonesdkarticles.com/2009/01/uitableview-searching-table-view.html 该教程看起来相当完整,我认为最终会得到你想要的,尽管我没有经过它广泛地。 – 2010-02-09 22:06:36