views:

16

answers:

1

Hi,

Many will find this question quite trivial, but since I'm quite new on iOS and COcoa programming, such questions simply arise. So, I have validation methods that need to know which control has called them, because validation rules depend on specific control. I know how to tag control with UIView tag property, but this works if I would create controls programatically. How do I do this if I created controls in Interface Builder?

A: 

If you select any element in your view hierarchy in IB and open the Attributes Inspector (Cmd+1), you should see an entry "Tag" towards the bottom of the list (right below "Mode", "Alpha" and "Background"). That's the property you've been setting programmatically.

Benjamin
THanks! It's well hidden :))
Mladen Despotovic