I have declared an enum datatype like:
typedef enum TagTypes
{
BUTTON_TAG_1 = 1,
BUTTON_TAG_2,
BUTTON_TAG_3,
NEW_TAG
}ButtonTag;
typedef enum TagType
{
LABEL_TAG_1 = 1,
LABEL_TAG_2,
NEW_TAG
}LabelTag;
I wanted to find the corresponding tag of the button or label through this tag value as
(clickedbutton.tag == ButtonTag.BUTTON_TAG1) or (changingLabel.tag == LabelTag.LABEL_TAG_1)
but this syntax doesn't seem to be possible in Obj C, it throws me error saying Expected Identifier or ")"
Is there a way i can select tagNames by specifying tagDatatype like:
LabelTag.LABEL_TAG_2, ButtonTag.BUTTON_TAG2, ...
Thanks for any help
clickedbutton.tag == BUTTON_TAG1 will work, but I prefer to use it like tagName.tagValue , so that i can have same tagValues for different tag sets say tagValue "NEW_TAG" in both LabelTag and ButtonTag.