1

Now I have two mutable array,

    1.songsName MutableArray;  
    2.songUrl MutableArray;  

on which songsName MutableArray contains huge collection of songs name list,the names are coming from url, and songUrl MutableArray contains corresponding url of songsName

am using xmlParser to retrieve this url content,custom cell is used for displaying the content,in my custom cell contains one label to display the song name and one play button to play the song I want to use search bar in this tableView now, Please help me to write code

islahul
  • 194
  • 1
  • 11

1 Answers1

0

if you use search bar in tableView , then scrolling time search bar scroll with table-view cell, so bad see this in so answer

and you use Uisearch Bar with tableView

and see UISearchDisplayController class refernce

In cellForRowAtIndexPat and in umberOfRowsInSection you should test witch tableView is displayed and return desired values.

if(tableView == self.searchDisplayController.searchResultsTableView){
// search view population
} else {
// all data view population
}
Community
  • 1
  • 1
Deepesh
  • 8,065
  • 3
  • 28
  • 45
  • Thanks,in my custom cell contains one label to display my song name and one button,button for play songs. Actually my search bar is able to search name but when the playButton pressed only play the original arrays object.row then how? – islahul Jun 28 '12 at 07:17
  • are you use - (void)filterContentForSearchText:(NSString*)searchText scope:(NSString*)scope {}delegte – Deepesh Jun 28 '12 at 07:28
  • see this http://www.iphonesdkarticles.com/2009/01/uitableview-searching-table-view.html and check condition cellForRowAtIndexPath – Deepesh Jun 28 '12 at 07:32