I am working on an iPhonne app that requires me to dynamically add a UILabel to a UIScrollView on a specific action and then delete the selected label from the same view.
I am able to add the labels, but unable to access the labels added to delete. Once the labels are deleted the rest of them shall auto adjust in the view.
Can you please help me out in this.
thanks in advance!!.... :)
When you add the UILabel you need to set it's tag. Eg
Then when you want to access the label again you do
Then you can remove the label or do anything else you normally do
Don't use tags of 0 or 1 as they are the defaults and you should have to views with the same tag.