For accessing individual buttons (subviews) of a main view depending on its tag,
UIView *v = [self.favScrollView viewWithTag:k];
if ([v isKindOfClass:[UIButton class]])
{
[v setAlpha:1.0];
}
here buttons are direct subviews for scrollview instead of main view.
UIView *v = [self.view viewWithTag:k];
if ([v isKindOfClass:[UIButton class]])
{
[v setAlpha:1.0];
}
But if are having a hierarchy like,
self.view -> scrollview-> buttons,
for accessing those buttons,
if ([v isKindOfClass:[UIButton class]])
{
[v setAlpha:1.0];
}
here buttons are direct subviews for scrollview instead of main view.
No comments:
Post a Comment