WINO APP

WINO APP

Got a vice that you need a little help cutting down on? Here’s my prototype for an app that will keep a running tally of your vice and let you know when it’s time to re-up.

Problem: Drinking too much wine

Goal: Cut down to only 1 bottle of wine per seven days- so once a bottle is opened, you cannot open another bottle until 7 days have past

Problem: It’s hard to keep track of how long it has been since you opened the bottle- maybe it’s 4 days, maybe it’s 5 days, maybe it’s 6 days–who knows! All you know is the bottle is finished so it’s time to buy another one right? ….WRONG!

Solution: the WINO APP!

Keeps track of the amount of days/hours/minutes/seconds its been since you opened the bottle, so you know exactly when a week has past and you can open a new bottle — no cheating!

So here’s how it works:

When you first launch the app, you will see the ‘Start Bottle’ button.

 

winoStart

 

Once it is clicked, the button disappears and will not be visible until 7 days pass. The current NSDate is collected from the system and stored persistently in NSUserDefaults. You can now close the app. When the app is re-opened again, the current NSDate is collected and compared against the saved date from the ‘Start Bottle’ click event. The difference is then subtracted from 7 days to create the amount of time left and the labels are updated like so:

wino

 

Another cool feature I added is that the yellow wine in the bottle drops a level each day, and a little inspirational label shows up next to it–this gives a nice little visual representation of the amount of wine that you should have left in your bottle. I acheived this effect by layering 7 different size yellow colored labels on top of each other, and hiding them succinctly. I get the time difference in seconds , calculate how many seconds are in 1 day (86400) — and hide the labels like this:

Here’s what is looks life at the half way mark 4 days in:

Screen Shot 2016-01-26 at 3.51.32 PM

 

For the Time Left, I did the following:

I got a lot of the indo for NSDATE from here

 

 

And as an added feature, the Total bottle count–which is of course stored persistently in NSUserDefaults

Full project can be found on my gitHub

 

You Might Also Like

Leave a Reply

Your email address will not be published. Required fields are marked *