IPAD must-haves. And fun-to-haves.

Brighten your iPad with a colorful cover, stream to your TV, download pictures from your digital camera, and more. There’s already so much you can do with iPad and iPad mini

Apple Wireless Keyboard

The incredibly thin Apple Wireless Keyboard uses Bluetooth technology, which makes it compatible with iPad

Apple unveils iPad mini: ‘Thin as a pencil, light as paper’

iPad inspires creativity and hands-on learning with features you won’t find in any other educational tool

Lightning connector and FaceTime HD camera

Apple announces 4th generation iPad packing an A6X CPU

Pages

Showing posts with label Counter. Show all posts
Showing posts with label Counter. Show all posts

Tuesday, February 12, 2013

Re: Counter across 3 View Controllers?


I suspect one of two problems.



1. An error in prepareForSegue. Put a breakpoint on prepareForSegue and step through each line to make sure it works. If it doesn't even get to the breakpoint, it is probably #2.



2. You formerly had IBActions for the buttons. If you just deleted the functions (the code) but did not update the storyboard by disconnecting the event, pressing the button will fault because it tries to execute the function, which does not exist. Select the button and view the connections in the Connections Inspector. If you see any connected event such as the Touch Up Inside in the picture below, if the target no longer exists, disconnect the event by pressing the small X.  Note: This is a common problem in many IDEs that have designers. If this is what caused the SIGABRT, in the debug output you will see something like this that tells you the reason: "'NSInvalidArgumentException', reason: '-[MiddleViewController yesButtonClick:]: unrecognized selector sent to instance."




This is a good reason for my advice to build the app from scratch, add one piece of functionality at a time, test each addition. Then when a fault occurs, you know it was caused by the last incremental change.


View the original article here

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


View the original article here

Tuesday, February 5, 2013

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


View the original article here

Re: Counter across 3 View Controllers?


Hello, I'm progressing really well but reached a stumbling block. I'm getting red circle errors...


Use of undeclared identifier "appDelegate". Use of undeclared identifier "initWithNIbName".


Since I use segues, I don't think I need to use the IBActons correct? I used your first idea, plus1 for the Yes segue and plus0 for the No segue since they need different values.


I know we're close, do you see anything I need to do? See screen shots below.




View the original article here

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


View the original article here