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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T16:47:05+00:00 2026-06-18T16:47:05+00:00

I have a NSScrollView that I want to scale down 50%. I do this

  • 0

I have a NSScrollView that I want to scale down 50%. I do this with the below code:

CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform.scale"];

animation.fromValue = [NSNumber numberWithFloat:1.00];
animation.toValue = [NSNumber numberWithFloat:0.50];
[animation setDuration:0.20f];

[animation setFillMode:kCAFillModeForwards];
[animation setRemovedOnCompletion:NO];

[self.scrollView.layer addAnimation:animation forKey:@"drag"];

This works, but the scroll view’s document view receives mousedown events when I click outside of the scaled down view. So although the scroll view and its content visually looks scaled down, they technically aren’t.

How would I go about doing this?

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-18T16:47:07+00:00Added an answer on June 18, 2026 at 4:47 pm

    Layer animation acts exactly as you describe (The animations only change the appearance, not the underlying geometry.)

    Try using UIView block animation and change the scroll view’s transform rather than the layer’s.

    EDIT:

    Oh. Sorry, I thought this was iOS. I guess I should have noticed that you said it was an NSView, not a UIView. I do most of my work in iOS these days, and my OSX experience is mostly from before the days of Core Animation.

    I think the answer is to get the view’s animation proxy and set the change on that, but I’ve only done a few learning exercises with animation proxies in Mac OS, so I’d have to do some digging to look up the specifics.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a IKImageBrowserView inside of a NSScrollView that is populated with a bunch
I have an (big) NSImageView embedded in an (smaller) NSScrollView. I want to automatically
I have a NSTextView that I want to display a horizontal scroll bar. Following
I currently have an NSTableView inside an NSScrollView and this gets it's contents from
Have written all the code in a silverlight class library (dll) and linked this
I have an NSScrollView that fills an entire window and displays a huge image.
I have a custom NSView that lives inside of a NSScrollView that is in
I have a Cocoa window, whose content view contains an NSScrollView that, in turns,
I have a grid CALayer (with a parent NSView, enclosed by an NSScrollView) that
I have a custom view that accepts key input, its inside a NSScrollView .

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.