In my view, I have 10 UIButtons each have a tag and a title. I can access one of the buttons by using
int i;
UIButton *button = (UIButton *)[view viewWithTag:i];
Is there a similar way to access the button via its title? something like [view buttonWithTitle:title]?
You would have to iterate through each button and compare its title against the title you are looking for. But this is not a good approach. Titles can change or you may support your app in multiple languages. Using a tag is the better approach. Give each button its own tag and it is easy to lookup each one. Then get the title of the button if you need it.