Pregunta

i am using iCarousel with some items(equal to array count) having label in it from January to december.
What to do,If i have to find index of December element and do auto scroll to that particular index.

For auto scrolling i have found 1 method

[_carousel scrollToItemAtIndex:(NSInteger*) animated:(BOOL)];
How to find index of item having December label?Thanks in advance .

¿Fue útil?

Solución

Get the index of the object in your array and it will match the index of the view in the carousel. If your array contains strings then you can get the index of december by saying

 NSInteger index = [array indexOfObject:@"December"];
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top