Access currentindex in next vc

Hi,

Task is to show cricket players names and their images in first vc inside tableview.
When I click on tableview didselect row that particular image and their name will be shown to sec vc.
And In sec vc there is a previous and next button, when click on previous button and next button data should change based on the index from first vc.

I have a doubt in sec vc, to show the previous and next data when click on these two buttons based on the index from first vc. Kindly please help me.

I’m moving your question to the App Development category. Please put questions in the right category to help others find answers if they’re facing the same problem.

You should pass the array to the secondVC and whatever the currentIndex is.

This can be done using a delegate/protocol, but also other ways

ok mikaelacaron, thankyou.