Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Identifying the Views using Tag similar to UIView

Hi ,

Is there a way to identify each view available, using a field like "tag" in iPhone SDK for UIView and other subclasses of it?

— asked July 7th 2010 by Radhakrishnan Selvaraj
  • iphone
  • tag
0 Comments

1 Answer

  • Not sure if the iphone supports it but Android supports arbitrary properties on objects.

    So you can use:

    nameLabel.theWordIs = "Bob";
    

    It should work as it's a js feature.

    — answered July 7th 2010 by David Ashwood
    permalink
    1 Comment
    • Sure, three years have gone by, but I'm still happy to report that iOS supports adding an arbitrary property, at least to a Ti.UI.VIew (3.0) object.

      — commented September 18th 2013 by Tony Adams
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.