I\'m parsing data with json, and i want to pass model_id to ActiveSubViewController / id_model. What am i doing wrong?
// ViewController.swift
//
// Copyright
Make string variable in your AppDelegate Like
var Model_id = String()
and where you are getting value of username and userid sends its value to AppDelegate. make AppDelgate object like below and same in destinationViewController
let appDelegate = UIApplication.shared.delegate as! AppDelegate
to pass value to app delegate variable
self.appDelegate. Model_id = "your Value"
and get your values wherever you want to fetch like below
let appDelegate = UIApplication.shared.delegate as! AppDelegate
let string = appDelegate. Model_id as! String