Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8258567
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:35:05+00:00 2026-06-08T02:35:05+00:00

I have an UIImageView(image loaded from remote server at runtime), now i want to

  • 0

I have an UIImageView(image loaded from remote server at runtime), now i want to open a specific url(say http://www.google.com) by clicking on this image. i have done this by clicking on button, but i dont know how to do that with imageView.
any suggestion or sample code will be appreciated.

Thanks!!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-08T02:35:08+00:00Added an answer on June 8, 2026 at 2:35 am

    In interface builder (or in your storyboard), select your UIImageView. Control-drag from the image to the header file of your class. Select “action”, and name it as you want. This will add something like

    - (IBAction)loadURL:(id)sender;
    

    in your header, and

    - (IBAction)loadURL:(id)sender {
    }
    

    in your .m file. Insert whatever code you need in this function, and I think you’re good to go !

    Let me know if you worked your way through.

    EDIT : Oops, seems like I talked a bit too quickly, this won’t work as you can’t add an action to a UIImageView. Another edit coming soon.

    EDIT #2 :

    Okay, first make sure your image view is “user interaction enabled” in the xib or on your storyboard. Then add an outlet for the image by control-dragging your UIImageView on your header file. Then use the UIResponder methods touchesBegan, touchesMoved, touchesEnded (and so on) to detect the touch on the image view : add this to your .m file :

    -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event {
    
        UITouch *touch = [touches anyObject];
    
        if ([touch view] == yourImageView)
        {
                NSLog(@"Touched !");
        }
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to pass my UIImageView that has a image loaded into it from
I have a UIImageView which has a png image sequence loaded into it. My
I have an image in an UIImageView and want to save it to the
I have an app that will show some images using UIImageView, now I want
I have a UIImageView whose frame, set before the image is loaded, is always
I have a custom cell loaded from my table, with an image and a
i have a view with uiimageview i assign this uiimageview image by camera..now i
I have a UIImageView embedded in a UIScrollView ... When the image is loaded
I have a UIImageView showing a image that is larger than it's frame. It's
I have a UIImageView that starts off with an image (loading.png) specified in IB.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.