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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:11:47+00:00 2026-05-26T07:11:47+00:00

I am scaling UILabel text using UIPinchGestureRecognizer. But I am not able achieve the

  • 0

I am scaling UILabel text using UIPinchGestureRecognizer. But I am not able achieve the smooth edges or smoothness of Text.

enter image description here

code for scaling:

UIPinchGestureRecognizer *pinchRecognizer = [[UIPinchGestureRecognizer alloc] initWithTarget:self action:@selector(scale:)];
        [pinchRecognizer setDelegate:self];
        [holderView addGestureRecognizer:pinchRecognizer];


  -(void)scale:(id)sender {

        [self bringSubviewToFront:[(UIPinchGestureRecognizer*)sender view]];

        if([(UIPinchGestureRecognizer*)sender state] == UIGestureRecognizerStateEnded) {

            lastScale = 1.0;
            return;
        }


        CGFloat scale = 1.0 - (lastScale - [(UIPinchGestureRecognizer*)sender scale]);


        CGAffineTransform currentTransform = [(UIPinchGestureRecognizer*)sender view].transform;
        CGAffineTransform newTransform = CGAffineTransformScale(currentTransform, scale, scale);

        [[(UIPinchGestureRecognizer*)sender view] setTransform:newTransform];

        lastScale = [(UIPinchGestureRecognizer*)sender scale];
    }

enter image description here

  • 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-26T07:11:48+00:00Added an answer on May 26, 2026 at 7:11 am

    The problem is that you’re scaling using a transformation. That takes the original rendering and scales it up or down, but doesn’t change it. In other words: the “quality” doesn’t change, only at what size you’re displaying it. What you want instead is probably to do the following steps:

    • Reset the transformation back to identity (need to do this for the next step).
    • Calculate and apply new frame size, reposition view.
    • Apply rotation transformation.

    By changing the frame size the view is drawn again with the new size which will result in better quality than scaling up a smaller view.

    I’m not sure whether changing the frame is possible during pinching (it might be messing with the recognizer), maybe you need to apply the transformation you’re doing right now and do the change-frame-size-method when the gesture is done to get a high quality version after the pinch is finished (you can see a similar pattern sometimes with scroll views).

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

Sidebar

Related Questions

i am scaling UIView using [UIView setTransform:CGAffineTransformMakeScale(2.0*scale.value, 2.0*scale.value)]; its works fine for me but
I want to animate the scaling down of a UIView, but not about its
I am scaling images by myself using the following codes. The code is fine
What scaling functions are used by the BitmapData.draw function for smooth and not smooth
According to the docs , using the CENTER attribute will not perform any scaling
I'm having a problem with image scaling. When I use the following code to
Using in-process session state is evil when it comes to scaling web applications (does
I'm simply trying to crop a JPEG image (no scaling) using PHP. Here is
I have a flex app I am scaling using systemManager.stage.scaleMode=StageScaleMode.NO_BORDER; for the most part
I'm having a simple scaling problem with CATextLayer, but i just couldn't figure it

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.