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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:19:08+00:00 2026-05-25T17:19:08+00:00

My UIScrollView on the iPhone is 480×230 and the content is 972×230 when first

  • 0

My UIScrollView on the iPhone is 480×230 and the content is 972×230 when first displayed. I need to provide functionality where when the user double taps the UIScrollView the contents zoom to fit with the 480×230 UIScrollView proportionally. When the double tap it again it should zoom back out to it’s original size.

What is the best way to do this? I have been fumbling for several hours with this and thought that this would work…

[bodyClockScrollView zoomToRect:bodyClockScrollView.frame animated:YES];

But nothing seems to happen.

Thanks, any help pointing me in the right direction would be appreciated.

  • 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-25T17:19:08+00:00Added an answer on May 25, 2026 at 5:19 pm

    Using CGAffineTransform I figured out a way to do what I want…

        //bodyCleckScrollView contains a UIView name bodyClock
        //get the scale factor required to fit bodyClock inside the iPhone window and resize it...
        CGFloat scale = 480/bodyClockScrollView.contentSize.width;  
        bodyClock.transform = CGAffineTransformScale(bodyClock.transform, scale, scale);
        //move bodyClock to the bottom of bodyScrollView.
        bodyClock.transform = CGAffineTransformTranslate(bodyClock.transform, 0.0,bodyClockScrollView.frame.size.height-bodyClock.frame.size.height);
        //scoll bodyScrollView so that bodyClock is centered in the window 
        CGPoint offsetPoint = CGPointMake(bodyClock.frame.origin.x, 0.0);
        [bodyClockScrollView setContentOffset:offsetPoint animated:YES];   
    

    This works great and when I want to zoom it back out to the default size and position you simply call…

        bodyClock.transform = CGAffineTransformIdentity;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In my iPhone app I have a UIScrollView with custom content views. At some
In iPhone application I want to generate a image of UIScrollView whose content size
I'm coding an iPhone TabBar Project with UiNavigation, the first view contain UIScrollView and
I am using a UIScrollView in an iPhone xib, and a property called myScrollView
I want to resize an image without UIScrollView in iPhone application. I want to
I am using CoreText on the iPhone to get italic text in a UIScrollView.
How can I use a UIDatePicker inside of a UIScrollView in my iPhone app.
I have a UIScrollView and a UIPageControl on my View in my iPhone app.
I have an iPhone application that is supposed to show images inside a UIScrollView.
I want to implement a UIScrollView that has a circular shape in iPhone, kindly

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.