Text
You are mixing between the VC.
In VC A (is it OverviewController), declare:
@IBOutlet weak var gradeValue: NSTextField! // data input field
var nameGrade: String = "" //data variable
No need to create nameGrade. But let's do it to show
In VC B (I understand it is FiguresViewController)
declare
var passedFromA: String = "" //data variable
in VC A, in prepare, you will pass the content of this textField
override func prepare(for segue: NSStoryboardSegue, sender: Any?) {
if let vc = segue.destinationController as? FiguresViewController {
// THIS is wrong, not needed OverviewController.value = nameGrade //ERROR Ambiguous use of value
nameGrade = gradeValue.text // You store the content of textField into this VC A property
vc.passedFromA = nameGrade // passedFromA is defined in VC B ; = "passedFromA"//ERROR Value of type 'FiguresViewController' has no member 'nameGrade'
}
}
Now, in VC B (FiguresViewController), in viewDidLoad
if let passedValue = passedFromA { // passedFromA is optional, need to test for nil
switch passedValue:
case 1 : // select plist1
case 2 : // select plist 2
default : // select default plist
}
Hope that's clear