0

I'm using a UISearchDisplayController to display some search results in a table view. Every time the text field of the search bar changes, the activity indicator spinner next to "Loading..." resets its animation. That is, if I query "a" in the search bar, the activity indicator begins its spinning animation. When I then query "aa," the activity resets its animation to the beginning of its spinning. This looks a little jarring when you are rapidly typing out a long string, because the spinner doesn't spin smoothly; instead, it keeps resetting to the beginning. Does anyone know how to make the spinner continuously spin as the table view loads results from the data source?

1 Answers1

0

Are you manually calling [myActivityView startAnimating] each time the search field updates? If so, you can can just check isAnimating first, so you don't (re-)start the animation:

if ( ! [myActivityView isAnimating]) {
    [myActivityView startAnimating];
}
Husker Jeff
  • 857
  • 1
  • 5
  • 6
  • Nope, I'm pretty sure the activity view is handled by the UISearchDisplayController. I don't have a handle to the view. – user1518848 Jul 11 '12 at 19:50