objective-c - re set sender tag after deleting
-
14-06-2021 - |
Pergunta
Is there a way to re set a sender tag like NSMutableArray does when you deleting an item ? My tag looks like : 1, 2, 3, 4... 20. When I'm deleting a view I want to retrieve the right order and not 1, 2, 4, 5... if I'm deleting the view number 3.
Thanks.
Solução
No. you will have to do it manually. Iterate subviews of parent view from the deleted view's tag.
One more way is: If you are adding those views in a predefined order, you can use the index of subviews array.
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow