Okay, I'm going to put on my humility cap and ask for help from any big brain iOS developers out there who are willing to provide it.
Here's my situation: I have a countdown timer that I need to show as a subview as the user makes their way through the some purchase screens (nothing to do with IAP, mind you). If the timer expires before they are finished, each screen will need to do something slightly different in order to "cancel" the purchase.
So, what would be a good way to architect a solution?
I'm definitely thinking about setting up a protocol and delegate methods to respond to the timer-expiration. And then probably a singleton to hold onto the UIView subclass I'm putting together so that each screen can add it as a subview. The subclass would be responsible for counting down and updating the display. Or do I not share the view and just have some model-backed timer that instances of the view would work with? Or some other approach that would make more sense?
Thoughts, comments, suggestions?
Thanks in advance for any advice.
Here's my situation: I have a countdown timer that I need to show as a subview as the user makes their way through the some purchase screens (nothing to do with IAP, mind you). If the timer expires before they are finished, each screen will need to do something slightly different in order to "cancel" the purchase.
So, what would be a good way to architect a solution?
I'm definitely thinking about setting up a protocol and delegate methods to respond to the timer-expiration. And then probably a singleton to hold onto the UIView subclass I'm putting together so that each screen can add it as a subview. The subclass would be responsible for counting down and updating the display. Or do I not share the view and just have some model-backed timer that instances of the view would work with? Or some other approach that would make more sense?
Thoughts, comments, suggestions?
Thanks in advance for any advice.