About screen transition data

Asked 2 years ago, Updated 2 years ago, 149 views

I'm having trouble passing data on two screens.

I would like to change the content displayed when I transition from the first screen to the second screen depending on the cell selected in TableView on the first screen.
You can change the contents of the second screen.

The current situation can be screen transitioned, and the contents are changed on the second screen and saved in NSUserdefaults, but the same contents are displayed no matter which cell in TableView on the first screen.

However, it's only natural because it's transitioned in Segue, but I want to save it so that the contents are displayed differently for each selected cell.

I look forward to your kind cooperation.

objective-c iphone

2022-09-30 20:46

1 Answers

There is no code for the base, so the following is an abstract description.Please forgive me.

If you need to confirm the changes you made on the second screen and reflect the changes on the first screen, you will define the delegate protocol next to the first screen and its delegate properties on the second screen, and call the method of the protocol at the end of the second screen.

It's not a table view, but I've found some helpful explanations, so how about learning them?

Control related code using StoryBoard
http://qiita.com/kazuma1107/items/d9a8fe2309d6a0fd91cd


2022-09-30 20:46

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.