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 6744881
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:08:13+00:00 2026-05-26T12:08:13+00:00

I have an imageview that has a pinchgesturerecognizer attached to it. In the pinchgesturerecognizer

  • 0

I have an imageview that has a pinchgesturerecognizer attached to it. In the pinchgesturerecognizer delegate method, I need to calculate the frame value of the transformation before it occurs in order to see if the scaling has pushed the imageview out of the bounds of the window. I know I need to use CGRectApplyAffineTransform to calculate the frame value each time, but since the imageview frame value will be invalid after the first transformation gets performed, do I need to now store the update frame value in an instance variable and keep updating it everytime a transform occurs, or is there someway I can obtain this value from the imageview itself?

  • 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-05-26T12:08:13+00:00Added an answer on May 26, 2026 at 12:08 pm

    So you want to check if a UIImageView is inside its window?

    I think you can ignore the view frame and instead start your calculations
    from the view bounds. This will include the transformation you have applied to the view.

    Apple has a section named The Relationship of the Frame, Bounds, and Center Properties in the View Programming Guide for iOS.

    CGRect imageViewBounds = imageView.bounds;
    CGRect imageViewBoundsInWindow = [imageView convertRect:imageViewBounds
                                                     toView:nil];
    CGRect windowBounds = imageView.window.bounds;
    if ( CGRectIntersectsRect( windowBounds, imageViewBoundsInWindow ) ) {
         // imageView is visible in its window
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ViewPager that has one ImageView per view. I need to setup
I have used ImageView's before and understand the different scale types that can be
I have a class that derives from ImageView . In its onDraw method override
I have never seen this before. I have a simple custom view that has
I have an extended BaseAdapter that has LinearLayout children (an ImageView and a TextView
I have an ImageView that has a drawable image resource set to a selector.
I have a Cocoa app I'm writing that has an ImageView with a TextView
I have a relative layout that has an ImageView and and a textview aligned
I have an Activity that has a main.xml with an ImageView. I then launch
I have a ImageView which shows a picture that has been taken from the

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.