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

  • Home
  • SEARCH
  • 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 8552039
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:19:55+00:00 2026-06-11T14:19:55+00:00

I have an UIImageView in a UITableviewCell. When it is tapped, the UIImageView should

  • 0

I have an UIImageView in a UITableviewCell. When it is tapped, the UIImageView should animated to be displayed fullscreen. When the image is tapped when it is fullscreen it should shrink back to the original position.

How can this be achieved?

  • 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-11T14:19:56+00:00Added an answer on June 11, 2026 at 2:19 pm

    Add a gesture recognizer to the view controller.

    Add the gesture Recognizer to your header file

    @interface viewController : UIViewController <UIGestureRecognizerDelegate>{
        UITapGestureRecognizer *tap;
        BOOL isFullScreen;
        CGRect prevFrame;
    }
    

    In your viewDidLoad add this:

    isFullScreen = false;
    tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(imgToFullScreen)];
    tap.delegate = self;
    

    Add the following delegatemethod:

    - (BOOL)gestureRecognizer:(UIGestureRecognizer *)gestureRecognizer shouldReceiveTouch:(UITouch *)touch;
    {
        BOOL shouldReceiveTouch = YES;
    
        if (gestureRecognizer == tap) {
            shouldReceiveTouch = (touch.view == yourImageView);
        }
        return shouldReceiveTouch;
    }
    

    Now you just need to implement your imgToFullScreen method.
    Make sure you work with the isFullScreen Bool (fullscreen if it is false and back to old size if it’s true)

    The imgToFullScreen method depends on how you want to make the image become fullscreen.
    One way would be:
    (this is untested but should work)

    -(void)imgToFullScreen{
        if (!isFullScreen) {
            [UIView animateWithDuration:0.5 delay:0 options:0 animations:^{
                //save previous frame
                prevFrame = yourImageView.frame;
                [yourImageView setFrame:[[UIScreen mainScreen] bounds]];
            }completion:^(BOOL finished){
                isFullScreen = true;
            }];
            return;
        } else {
            [UIView animateWithDuration:0.5 delay:0 options:0 animations:^{
                [yourImageView setFrame:prevFrame];
            }completion:^(BOOL finished){
                isFullScreen = false;
            }];
            return;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have an UIImageView in my UITableViewCell which is not being displayed. I get
I'm trying to set up a UITableViewCell that can have an image in the
I created a UITableViewCell in Interface Builder which I have added a UIImageView and
I have a UITableViewCell nib file in which there is a UIImageView and a
I have a custom UITabvleViewCell that has a UIImageView in it. I can set
I have an UIImageView which can be rotated, panned and scaled with gesture recognisers.
I have a UIImageView which has a png image sequence loaded into it. My
I have a UIImageView showing a image that is larger than it's frame. It's
I have a UITableView. I place an UIImageView on each row UITableViewCell. I used
I have custom UITableViewCell and UIImageView in it. I need to switch the content

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.