pprevalon pprevalon - 8 months ago 30
Swift Question

Swift how to pass data to a UINavigation

Im trying to pass data to a

I know how to do this with a regular view controller and it work fine but when I try to do it with a UINavigationController I get an error "Value of typ 'UINavigationController' has no member 'availaible users'" I checked online for this issue everything I found had to do with using segue. I'm using code only for this project.

func nearbyUsersWithArray(){
let vc = UINavigationController(rootViewController: NearByUsersViewController())

vc.availaibleUsers = ["item to passed here"]
self.present(vc, animated: true, completion: nil)


let vc = NearByUsersViewController()
vc.availableUsers = ["item to passed here"]
let nvc = UINavigationController(rootViewController: vc)
self.present(nvc, animated: true, completion: nil)