Xcode random sting generator

Discussion in 'iOS Programming' started by fizy45, Jul 22, 2012.

  1. fizy45 macrumors newbie

    Joined:
    Jul 22, 2012
    #1
    As the title says I need random string generator for xcode while making ios development.I will have 5 strings and after clicks random strings will show up.

    I found this topic on this forum and tried it has worked but its for mac development and although I chanced it for ios it didng worked so I decided to post here.

    All I want is this codes ios verision please somebody help me !!!

    http://forums.macrumors.com/showthread.php?t=692150
     
  2. jnoxx macrumors 65816

    jnoxx

    Joined:
    Dec 29, 2010
    Location:
    Aartselaar // Antwerp // Belgium
    #2
    Create an NSArray with the strings you need.
    Then use arc4Random to get an string randomly out of the array (with objectatindex), and use that/display that.
    What's the hustle?
     

Share This Page