Advertise Mobile SDKs Books Events Forum News Social Networking Support Us
Follow @iphonedevsdk on Twitter

Interface 2, Advanced iOS
Mockup & Code Gen
($9.99)

Make your own iPhone apps
and run them live!
(free)

Pic Frame Dynamo: Photo Editing
($0.99)

Abiliator
($1.99)

Want your application or service advertised on iPhone Dev SDK?

Go Back   iPhone Dev SDK Forum

View Single Post
Old 05-17-2009, 03:56 PM   #7 (permalink)
deansx
Objective-C Code Monkey
 
deansx's Avatar
 
Join Date: May 2009
Location: Mountain View, CA
Posts: 127
deansx is on a distinguished road
Default

Quote:
Originally Posted by kieran12 View Post
Hey everyone. I have a UIImageView that I want to receieve an action. I want it to act like a button. It will not have an image set so it will be invisible, then when tapped i want it to change to an image.

I know that IBActions do not work on a UIImageView. How could I achieve this?


P.S I don't want to set the image property of a button it must be a UIImageView.
The default value for the userInteractionEnabled property of a UIImageView is NO. To make a UIImageView accept actions, you need to set the value of the property to YES.
Code:
[myUIImageView setUserInteractionEnabled:YES];
deansx is offline   Reply With Quote
 

» Advertisements
» Stats
Members: 175,638
Threads: 94,102
Posts: 402,823
Top Poster: BrianSlick (7,990)
Welcome to our newest member, Studder
Powered by vBadvanced CMPS v3.1.0

All times are GMT -5. The time now is 11:38 AM.
Powered by vBulletin® Version 3.8.0
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.