开发者

Tagging control that was created in Interface Builder

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 cont开发者_StackOverflowrol. 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?


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜