Please give me an advice.
I create UILabels programmatically (dynamic).
Is there is a chance to add Event to them?
What I want by steps:
- I create UILabel;
- I set Event to it; (NSNotification?)
- When I do some action (rotate, for example) I want that Label is changed or removed. An extended example: I create Labels and when I rotate device I want that part of them (which with attached Events) disappear in animation.
I create a lot of Labels, so I can't just set them global variables. And I can't set them tags unlimited. So UILabel *label = (UILabel*)[self.view viewWithTag:labelCount
not a solution. Getting element by 'viewWithTag' has one more trouble - when set animation to that element and that element already in animation happens collision - they plays one over other...
I create Labels like this:
CGRect *labelFrame = CGRectMake(left, top, width, height);
UILabel *label = [[UILabel alloc] initWithFrame:labelFrame];
label.text = @"Hi, I'm one of these army of labels";
[self.view addSubview:label];
PS: Sorry for English.