samedi 9 mai 2015

Find the time/date from min./hours/seconds swift 1.2 xcode 6.3

Sorry My Title Is So Bad. :(

I am making a app to find out how long it will be before you have to go collect your belongings from a game. So you enter how much ore you want and it will do the math, It will tell you how much wood you will need and how long it will be. I want to send them a local notification when the ore will be done cooking. SO i need a way to find what time it will be after the "unknown" amount of time for the ore to be done.

This is the code to find how long before the ore is done.

timeAmount = oreWanted * 11

enter image description here And after you start the timer I want it to find the date and time when it will be done, so it will notify the user. I tried just having a basic timer and when it reached 0 it did a local notification, but the app couldn't be closed because the timer would stop. I need a way so the app can be completely closed and still notify them. Thanks

Aucun commentaire:

Enregistrer un commentaire