Pretty self explanatory code, my issue is the first print shows the correct value but the second print always show 0. I'm trying to pass the value of the stepper to my next view controller (calcVC).
Edit: Forgot to mention that my issue happens when I click a button which triggers an unwind segue to CalcVC which is when I loose the value. Also, this code is in TableViewCellVC and my unwind segue is from TableViewVC to CalcVC which is why I'm having issue on CalcVC.
Final Edit: Fixed it by creating a global variable
var stepperValue = 1
@IBAction func stepperValueChanged(_ sender: Any) {
stepperValue = Int(stepper.value)
print(stepperValue)
stepperLabel.text = String(stepperValue)
let CalcVC = CalculatorVC()
stepperValue = CalcVC.calcVCStepperValue
print(stepperValue)
}