a small question (xcode button actions)

Member
Posts: 178
Joined: 2008.09
Post: #1
hi again.... thanks one more time to red my post.

whell first i want to learn how can I do
when a people press a button (on iphone) change the png.

for example.... is ther is a cat.png
when press TOUCH UP INSIDE, the cat open the mouth.

just changes the picture of a button when press please. !

thanks a lot !

my iphone website: http://www.elsalvadorguia.com
intel Imac 20", iphone 8GB (2G)
Quote this message in a reply
Member
Posts: 178
Joined: 2008.09
Post: #2
Hi again..
i got this code, and write, but is not working
what iswrong, please help !

[Image: foto-2imagen.jpg]

my iphone website: http://www.elsalvadorguia.com
intel Imac 20", iphone 8GB (2G)
Quote this message in a reply
Member
Posts: 283
Joined: 2006.05
Post: #3
BOTON isn't defined in your code. If it's in your .xib file, you'll still need the appropriate IBOutlet in your header file and to make the connection.

In your case, you could probably use [sender setBackgroundImage:AUXIMAGE forState:0] as well.

One other option; you could just set it up in Interfcace Builder - there's options to set the image for the button's various states. Just put the name of the image in the field in the inspector.
Quote this message in a reply
Member
Posts: 178
Joined: 2008.09
Post: #4
thanks... i will try
i will tell you tomorrow !

my iphone website: http://www.elsalvadorguia.com
intel Imac 20", iphone 8GB (2G)
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Xcode 4 OpenGL Game Template Question Macmenace 4 6,532 Mar 19, 2012 06:03 PM
Last Post: Macmenace
  Increase skill level button dunhill68 12 5,346 Jan 8, 2010 02:57 PM
Last Post: dunhill68
  XCode question kendric 3 2,976 Apr 30, 2009 02:55 PM
Last Post: OptimisticMonkey
  Saving the game state when pressing the Home button Nacho 3 3,321 Feb 10, 2009 05:33 PM
Last Post: Nacho
  curiosity button question imaumac 6 3,177 Jan 27, 2009 04:02 PM
Last Post: imaumac