Hi Everyone,
Hey, this is my first post! Woo hoo.
I'm a long-time C++ / XWindows programmer getting into programming my iPhone. I have a question regarding the proper paradigm for designing a view to set application settings.
I chose a "utility" app that has a nice front side and flip side view.
I then added some switches, sliders, etc. to the flipside view controller. I didn't have a problem querying their values when the MainViewController's flipsideViewControllerDidFinish message was sent...
But, the way the utility app is designed, the flipside's view seems to be "reclaimed" when you hit the done button... and then recreated as necessary. So, the previous values of my switches, sliders, etc. get set back to their default values instead of remembering what they were.
That's when I said, "No problem, I'll just store their values in my mainViewController's object definition when the done button is hit and then restore their values to the last settings when the little "i" button is pushed.
Something tells me that my implementation isn't a very good paradigm and that I'm doing something stupid.
Thoughts?
P.S. I just tried creating the flipside controller as a static variable and then alloc and initing it only once... and then not releasing it. IE, keeping it around. And, that seems to work, but again, I get this feeling I'm not doing things right.
Hey, this is my first post! Woo hoo.
I'm a long-time C++ / XWindows programmer getting into programming my iPhone. I have a question regarding the proper paradigm for designing a view to set application settings.
I chose a "utility" app that has a nice front side and flip side view.
I then added some switches, sliders, etc. to the flipside view controller. I didn't have a problem querying their values when the MainViewController's flipsideViewControllerDidFinish message was sent...
But, the way the utility app is designed, the flipside's view seems to be "reclaimed" when you hit the done button... and then recreated as necessary. So, the previous values of my switches, sliders, etc. get set back to their default values instead of remembering what they were.
That's when I said, "No problem, I'll just store their values in my mainViewController's object definition when the done button is hit and then restore their values to the last settings when the little "i" button is pushed.
Something tells me that my implementation isn't a very good paradigm and that I'm doing something stupid.
Thoughts?
P.S. I just tried creating the flipside controller as a static variable and then alloc and initing it only once... and then not releasing it. IE, keeping it around. And, that seems to work, but again, I get this feeling I'm not doing things right.