Reputation: 1174
i have horizontal and vertical scrollview, for example one scrollview have four button and and second scrollview have six button and more so, when i click on any button then got index of last scrollview view, i already using tag.
my problem is for example i click on third scroll then i want both tag third scroll tag and specific button tag.
Upvotes: 0
Views: 358
Reputation: 8322
track your index as below :
- (IBAction)clickonbutton:(UIButton *)sender {
UIScrollView* yourscrollview = (UIScrollView*)[sender superview]; // track your scrollview as per your view hierarchy
NSLog(@"%ld",(long)yourscrollview.tag);
NSLog(@"clicked button tag%@",sender.tag);
}
Upvotes: 1