Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Counter across 3 View Controllers?

Need a way to make a counter work across at least 3 View Controllers.

One view controller has an -(IBAction)plus1 button and an -(IBAction)plus 0 button.


Those buttons segue to the next view controller, that has an -(IBAction)plus2 button and an -(IBAction)plus 0 button.... etc.


Each segues and adds all button clicks through to the last view controller with an IBOutlet UILabel *count text label.


I got this to work on one view controller. Can't figure out how to make it work across 3VCs. Someone suggested Singleton?

Thanks for any thoughts.


Thanks JDL55

Posted on Feb 2, 2013 9:11 PM

Reply
34 replies

Oct 2, 2013 8:01 PM in response to JDL55

In my test project, I changed the target Devices to Universal, added an iPad storyboard, and set the target iPad deployment Main Storyboard to the new iPad storyboard. I added navigation/view controllers, copy/pasted controls from the original storyboard, and hooked up IBOutlet/Actions. It works fine with the same StepViewController. What problem are you having?

Counter across 3 View Controllers?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.