iPhone app questionary, aks a different question every day
I am developing a questionary app, I want to store a lot of questions and make the app capable to ask me a diferent question every day, and if the question was already asked, go to the next questio开发者_如何学Cn, I mean, diferent questions, every time the app is loaded, but I can't make it work, also want the app permit to take only one question per day, I appreciate your help... I am stuck here.
It will be necessary to store, for each question, the "already asked status". So if your questions are stored in a text file, add a delimiter and then a symbol to indicate the question has been asked. Then, every time you open the questions file, keep skipping down until you find a question that has not been marked "already asked". For your second requirement, you'll need to store somewhere the date of most-recent asking. Consider putting this in the question file as well (assuming you are indeed using a file) as a third datum for each question. Then you will have a "historical timeline" of question askings.
精彩评论