Hi, I want to know how I would be able to have my app choose a selection of text from a list of multiple selections when a button was pressed. In example, a random tip for an app every time a "give me a tip" button was pressed.
Hi, I want to know how I would be able to have my app choose a selection of text from a list of multiple selections when a button was pressed. In example, a random tip for an app every time a "give me a tip" button was pressed.
Thanks, I'm very new to programming in a C based language. I will look into this. How would I be able to set this up with a list of tips or something of the sort? I want to have a button you can press to bring up a tip. If you have any information pleasse let me know.
Once you have a random key, you could have a database, an array, a list of files or whatever with a number (say 1-50) identifying each piece of tip text that you draw upon when the button is pressed.
The random number therefore determines which decision is made.
To create the button that displays the view is easy using UIKit, which I hope you are familiar with. If not, you should read up on views etc using Appe's documentation.
The tip could be displayed in a label in a modal view, or perhaps in a UIAlertView. The opportunities are endless...