Reputation: 2045
I have IBOutlets named for example: outlet1, outlet2, outlet3. I want to access this outlets using @"outlet%d" where %d is value of variable. Is it possible?
Upvotes: 0
Views: 238
Reputation: 150615
Did you try:
[myClass valueForKey:[NSString stringWithFormat:@"outlet%d", i]];
Have a look at the Key Value Programming Guide
Upvotes: 1