Please explain in an easy-to-understand way how to obtain TableView cell numbers in indexpath.

Asked 2 years ago, Updated 2 years ago, 35 views

Please explain in an easy-to-understand way how to get the TableView cell number in indexpath.

Also, please let me know how to match the index number of the array with the transition destination information to the cell line number.Please.

ios swift

2022-09-30 10:32

1 Answers

Please explain in an easy-to-understand way how to get the TableView cell number in indexpath.

If you use indexPath.section and indexPath.row, you will probably get what you call a "cell number."
If you only have one section, you can retrieve the number of cells in the table by using indexPath.row.

Please also let me know that the index number of the array containing the transition destination information corresponds to the cell line number.

If there is only one section, I think you can use indexPath.row as the index number of the array.

As mentioned above, I can only answer simple questions that are obvious.

If you're coding using TableView and you don't know what to do, be more specific

"I wanted to do this kind of thing, so I used this information as a reference to do this kind of coding, but somehow I end up doing this kind of thing.How do I get it to work as intended?"

You may want to ask the question

How do I ask a good question?
It is also recommended that you read .


2022-09-30 10:32

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.