Answer the question
In order to leave comments, you need to log in
How to make multiple delegates for a table?
Good evening, you need to create a MULTI Delegate
In addition, it's one thing to create it, and another thing to do it with a standard table view.
I pass the table delegate to another class, when it successfully uses it in my 1st class (with the table itself), the corresponding method is not called ((
In general, how to make 2 more delegates for the table?
Answer the question
In order to leave comments, you need to log in
You can, as mentioned above, or you can make two delegates, and when the first one is called from tableView, immediately call the second custom one in another class. Describe in more detail which delegate from tableView, what needs to be done in the first delegate of the main tblView delegate and what is in another class - we will find a solution
If we look at the uitableview class, we will see that there can be only one delegate.
There are workarounds, for example, to make your own wrapper, which will store several delegates in itself, and itself be a table delegate. When calling a method on a table, the wrapper will call the same method on all other delegates.
It's just that it's all a little weird. Why do you need this? It is possible that there are more elegant solutions.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question