Please do not post the same thing multiple times. The board software automatically flags certain posts as needing moderator attention. This happens the most often for new users. I'm pretty sure this is made clear at the time you attempt to post. Posting the same thing over and over again just makes that many more posts the moderators have to weed through later. This makes us sad. Don't make us sad. If your post/thread doesn't appear, just wait a while. Don't post it again. If it hasn't shown up by the next day, then you can try again. I normally go through posts in the mornings, and try to check a few times throughout the day, but I'm not here 24/7. There will typically be a significant delay before posts are approved. Just be patient.
Iam started to make a simple quiz application in Xcode Viewbased application for iPhone.
I have 50 questions all questions are in the array. I have to select questions random with out repeat questions.
vineeshtp88@gmail.com
Thanks in Advance
0 •
Replies
#include <stdlib.h>
int numberOfItemsInArray = [arrayWithQuestions count]; //find out how many questions you have
int randomNumber = arc4random() % numberOfItemsInArray; //generate a number less that or equal to the number of questions
[arrayWithQuestion objectAtIndex:randomNumber]; //do with this what you will, this will return a random array item
Note: This code is untested.
Our Only App - Jubilee Weather
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomerandomPhrases is my NSMutableArray. The method shuffles the array and shows the array in the console once it is shuffled.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like AwesomeOur Only App - Jubilee Weather
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome- Spam
- Abuse
- Troll
0 • Off Topic Insightful Disagree Dislike Like Awesome