I have ‘n’ button. I want to shuffle those button in my application. Or you can say that i want to shuffle the title over buttons. Is it possible.Its an Iphone app.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
What you might need to know:
frameproperty. If you change just theoriginmember ofCGRect, you can move the button without resizing it.setTitle:forState:method ofUIButton.rand()method. For more serious random number generation there are other methods available butrand()should suffice for your needs. Just ensure to callsrand()with some seed before your first call torand().IBOutletvariables. Creating them yourself and maintaining them in an array will give you greater control over their shuffling. Creating them manually has been discussed on StackOverflow previously.