IPhone : Is there any way to get the tag of `UIButton` while animate `UIScrollView` ?

on Tuesday, February 24, 2015

I have a UIScrollView with 50 UIButtons. I am trying to animate those by changing offset of UIScrollview.



NSTimeInterval animationDuration = scrollView.contentSize.width/80;
[UIView animateKeyframesWithDuration:animationDuration delay:0.0 options:UIViewAnimationOptionCurveEaseIn |UIViewAnimationOptionAllowUserInteraction animations:^{
scrollView.contentOffset = CGPointMake(scrollView.contentSize.width - scrollView.frame.size.width, 0);
} completion:^(BOOL finished) {

}];


But when I click on any of the UIButton, I am getting last two tags which is 48 & 49.


If I do not animate UIScrollView's content offset it works fine & perfect. Is there any way to get the tag of UIButton while animate UIScrollView ? Thank You in advance.


0 comments:

Post a Comment