i got your question.. you can't directly assign two tags to any UIView or any subclass directly. but you can achieve indirectly may this code helps to achieve your intension to get two tags at the end
#define First_Tag 100
#define Second_Tag 200
-(void)createButton
{
UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
button.tag = ((First_Tag*10000)+30000)+(Second_Tag*10);
[button addTarget:self action:@selector(button:) forControlEvents:UIControlEventTouchUpInside];
}
- (void) button:(UIButton *)sender
{
int intTag2 = ((sender.tag-30000)%10000)/10;
int intTag1 = ((sender.tag-(intTag2*10))-30000)/10000;
NSLog(@"tag numbers are %d and %d", intTag1, intTag2);
}
I've used several big numbers to encode the tag .. hope it solves your problem to assign two tags