In the IB under Identity tab you can find an attribute called "Object ID". I can not find a way to get hold of this ID from code. Oh, and I know about the tag attribute but it's not what I need.
I essentially would like to get the unique object ID for a UIComponent that was touched on the sceen. I already have the UITouch object.
Find User (Object ID) Browse to or search for the desired user, then select the account name to view the user account's profile information. The Object ID is located in the Identity section on the right. Find role assignments by selecting Access control (IAM) in the left menu, then Role assignments.
For every object, Ruby offers a method called object_id. You guessed it, this represents a random id for the specific object. This value is a reference of the address in memory where the object is store. Every object has a unique object id that will not change throughout the life of this object.
For UIView I normally use the tag
property.
- (IBAction) buttonPressedid) sender {
NSLog(@"tag: %i", [sender tag]);
}
I'm pretty sure you can set the tag
property in IB :)
The Object ID in Interface Builder is only an internal book-keeping value used by IB when deserializing/serializing XIB files, and does no longer exist when the Application runs.
You want to use tag
, or alternately, a property/outlet.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With