I have an NSArray which contains 10 objects from index 0 – 9. Each entry in the array is a quotation.
When my user selects the ‘random quote’ option I want to be able to select a random entry from the array and display the text that is contained in that entry.
Can anyone point me in the right direction on how to achieve this?
I’d recommend you use this instead of hardcoding the 10; that way, if you add more quotations, it will work it out automatically, without you needing to change that number.