Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

harita

macrumors newbie
Original poster
May 22, 2009
5
0
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
 
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.
 
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


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.
 
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

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.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.