I add 10 buttons to UIScrollView
for (int i=0; i<10; i++) {
UIButton *btn = ....
[ScrollView addSubview:btn];
}
How can i refer to each button ?
I add 10 buttons to UIScrollView
for (int i=0; i<10; i++) {
UIButton *btn = ....
[ScrollView addSubview:btn];
}
How can i refer to each button ?
Either set the tag on each view, and find them using viewWithTag, or save references to each in an NSMutableArray or other data structure.