Action sheet in objective-c

Discussion in 'iOS Programming' started by harita, May 24, 2009.

  1. harita macrumors newbie

    Joined:
    May 22, 2009
    #1
    hi, Am new to objective-c. I hav done with how to open an Action sheet on button's click. Now, i want that the when i click on button of action sheet then the text value of the button is shown on the button(which is used to open the action sheet)......so, if anyone cud give the code of actionSheet:clickedButtonAtIndex: method. plz reply to my query..thanks
     
  2. BlackWolf macrumors regular

    Joined:
    Apr 9, 2009
    #2
    no I won't give you code just like that. you should rather think about were exactly your problem is, why can't you do it? if you know that, ask.
     
  3. harita thread starter macrumors newbie

    Joined:
    May 22, 2009
    #3
    hi
    i hav just started objective-c..............i hav don action sheet bt i don't know how to pick action sheet button to work.....atleast give me ny clue abt it.
    thanx


     
  4. BlackWolf macrumors regular

    Joined:
    Apr 9, 2009
    #4
    I don't really know what clue to give you ^^ you already know there is a method actionSheet:clickedButtonAtIndex: ... and that's where you need to put in your code. it's really very simple from there one. you have a parameter "index" that gives you the index of the button that was pressed. all you have to do now is "if index is 1, then set the text of the button to foo, if index is 2 set it to something"

    ... it's really that simple.
     

Share This Page