I've declared an enum like so:
typedef enum
{
firstView = 1,
secondView,
thirdView,
fourthView
}myViews
My goal is that a UIButton
will trigger another function with the uiButton
sender.tag
and that function will know to convert the integer to the correct view. I'm aware that I can just create an array with the names of the views but I am looking for something smarter than that using the declared enum.
Example:
-(void)function:(UIButton *)sender
{
...
...
NSLog(@"current View: %@",**converted view name from sender.tag);
}
Thanks