I'm trying to pass data from UITableview
to another UITableview
, I succeed to pass data when I press on cell
but I couldn't pass data back when I press on back button of navigation bar; I've tried global variables to solve this problem but since I'm storing date of those variables in database it causes a lot of problems to me, because it enforces all stored reminders to save the same data, I could to do some tricks to solve this problem but we all know that global variable is bad practice and does't confirm to OOP
neither MVC
, the question is how to pass data back with using Prepare for segue
function; note that the table view are static not dynamic.
and if your were asking what data I'm trying to pass is days of week, when Friday and Saturday are selected for example it sends back true values to previous view and if Friday and Saturday are deselected false values are sent back to previous view
so how can I solve this problem?
thanks in advance