dimanche 18 janvier 2015

Random websites button - Xcode

this one is pretty simple I guess but I just can't find the answer that would suit perfectly for my issue. I want to make a button that opens a random URL from a list I'll give him, let's say - google, youtube and facebook just for the example. This is my line of code that connects now only to google...:



- (IBAction)Site:(id)sender {
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:@"http://google.com"]];
}


Can someone please advise me what to add to the code so it will randomly pick these other websites as well?





Aucun commentaire:

Enregistrer un commentaire