Search Bar ResignFirestResponder hides Items
I have this search bar in my app Please see the play,next and previous
buttons.
when i search and click on a song from the search items resigning first
responder for search bar hides my buttons i.e play,next and previous
buttons.
i am using this code
- (void)tableView:(UITableView *)tableView
didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
MPMediaItem * song;
_nowPlayingIndex=indexPath.row;
if (tableView == self.searchDisplayController.searchResultsTableView)
song = searchResults[_nowPlayingIndex];
else
song = _songs[_nowPlayingIndex];
[self.musicPlayer setNowPlayingItem:song];
[self.musicPlayer play];
_playButton.hidden=true;
_pauseButton.hidden=false;
[_mySearchBar resignFirstResponder];
}
Why are my buttons Hidden?
No comments:
Post a Comment