A button is a view, so -viewWithTag:
will find it just fine. The only issue is your sender
type not agreeing with the type returned by -viewWithTag:
, but you can solve that with a cast if you're sure the view you'll get back is a button, or you can check first:
[calc_view digitPressed:(UIButton*)[calc_view viewWithTag:6]];
or:
UIButton *button = (UIButton*)[calc_view viewWithTag:6]];
if ([button isKindOfClass:[UIButton class]]) {
[calc_view digitPressed:button];
}
Either works in practice; the latter is safer and makes it easy to add an additional test: you could fail the test if the button isn't a UIButton.