UIAlertView: OpenURL from NSArray - Can someone shed some light into this?

Discussion in 'iOS Programming' started by Terenc3, Mar 22, 2012.

  1. Terenc3 macrumors member

    Jul 15, 2010
    I have a UITableView where each row being clicked, will show an UIAlertView. This UIAlertView will allow users to either dismiss message or proceed on to URL.

    Could someone help me with my following code and see what is wrong as I can't seem to execute what I want? =)

    Codes are Here

    Thanks in advance. =)
  2. robbieduncan Moderator emeritus


    Jul 24, 2002
    1) Put your code here: linking to your question on another site is at best a bit rude, at worse useless in future if that site is closed/offline

    2) buttonIndex is the index of the button in the UIAlertView that was touched. So it will always be 0 or 1 if there are only two choices. You cannot use this to index into the array of URLs: save the index in the array into an instance variable in the class and use this to index into the array in the UIAlertView handler.

Share This Page