gdavis/GDIIndexBar — pull request #4 by guillaume-algis (2014-04-28 10:02:26+00:00)
Title: Limit the number of calls to indexBar:didSelectIndex:

When sliding your finger on the index bar, the delegate's method `indexBar:didSelectIndex:` gets called mutiple times for each index.
This fix the issue by sending only one message per index the finger passes on.

Logs before:

2014-04-28 11:51:20.652 GDIIndexBarDemo[19512:60b] indexBar did touch 1
2014-04-28 11:51:20.652 GDIIndexBarDemo[19512:60b] indexBar did touch 1
2014-04-28 11:51:20.652 GDIIndexBarDemo[19512:60b] indexBar did touch 1
2014-04-28 11:51:20.652 GDIIndexBarDemo[19512:60b] indexBar did touch 1
2014-04-28 11:51:20.652 GDIIndexBarDemo[19512:60b] indexBar did touch 1
2014-04-28 11:51:21.107 GDIIndexBarDemo[19512:60b] indexBar did touch 2
2014-04-28 11:51:21.107 GDIIndexBarDemo[19512:60b] indexBar did touch 2
2014-04-28 11:51:21.107 GDIIndexBarDemo[19512:60b] indexBar did touch 2
2014-04-28 11:51:21.107 GDIIndexBarDemo[19512:60b] indexBar did touch 2
2014-04-28 11:51:21.107 GDIIndexBarDemo[19512:60b] indexBar did touch 2
2014-04-28 11:51:21.348 GDIIndexBarDemo[19512:60b] indexBar did touch 3
2014-04-28 11:51:21.348 GDIIndexBarDemo[19512:60b] indexBar did touch 3
2014-04-28 11:51:21.348 GDIIndexBarDemo[19512:60b] indexBar did touch 3
2014-04-28 11:51:21.348 GDIIndexBarDemo[19512:60b] indexBar did touch 3
2014-04-28 11:51:21.348 GDIIndexBarDemo[19512:60b] indexBar did touch 3
2014-04-28 11:51:21.539 GDIIndexBarDemo[19512:60b] indexBar did touch 4
2014-04-28 11:51:21.539 GDIIndexBarDemo[19512:60b] indexBar did touch 4
2014-04-28 11:51:21.539 GDIIndexBarDemo[19512:60b] indexBar did touch 4
2014-04-28 11:51:21.539 GDIIndexBarDemo[19512:60b] indexBar did touch 4
2014-04-28 11:51:21.539 GDIIndexBarDemo[19512:60b] indexBar did touch 4
2014-04-28 11:51:21.539 GDIIndexBarDemo[19512:60b] indexBar did touch 4

Logs after:

2014-04-28 11:51:20.652 GDIIndexBarDemo[19512:60b] indexBar did touch 1
2014-04-28 11:51:21.107 GDIIndexBarDemo[19512:60b] indexBar did touch 2
2014-04-28 11:51:21.348 GDIIndexBarDemo[19512:60b] indexBar did touch 3
2014-04-28 11:51:21.539 GDIIndexBarDemo[19512:60b] indexBar did touch 4