I have two steppers in a ViewController, one called homeStepper
the other called awayStepper
. When I run the app on my phone the value for homeStepper changes just fine, however nothing happens when I try to use the awayStepper. I added log statements and they just show the value of the stepper never changing. It always sits at 0 no matter how many times I push either button on it. Here is my code: https://github.com/Zach443/ScoreKeeper/blob/c83d5eeaadafaad4f093437679d26a8b55ef5dd8/ScoreKeeper/ViewController.swift
Asked
Active
Viewed 148 times
0

Zach443
- 311
- 1
- 2
- 12
-
When you press the stepper does the "awayStepper pressed!" NSLog never appear? (Asside, the general advice is to post code snippets directly here rather than links). – Ali Beadle Feb 14 '16 at 08:19
-
@AliBeadle That log shows up, and the one before that showing the value always says 0. Same for the awayScore label. – Zach443 Feb 14 '16 at 08:21
1 Answers
0
You have a typo:
approxAwayScore = homeStepper.value
Should be
approxAwayScore = awayStepper.value

Ali Beadle
- 4,486
- 3
- 30
- 55
-
@Zach443 No probs. Cut-and-paste - we have all been there! Also, you are passing score into updateScore but never using it? – Ali Beadle Feb 14 '16 at 08:28
-
yep... I've been voicing around with ideas and I forgot to remove that – Zach443 Feb 14 '16 at 08:30