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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T06:25:02+00:00 2026-06-04T06:25:02+00:00

I know how to flip/reflect/rotate a UIImage by re-drawing it within it’s bounds. –

  • 0

I know how to flip/reflect/rotate a UIImage by re-drawing it within it’s bounds.

- (IBAction)reflectImageView:(UIImageView)imageView {

    UIGraphicsBeginImageContextWithOptions(imageView.bounds.size, NO, 0.0);
    CGContextRef context = UIGraphicsGetCurrentContext();
    CGContextScaleCTM(context, 1.0, -1.0);
    CGContextTranslateCTM(context, 0.0, -imageView.bounds.size.height);


   [imageView.layer renderInContext:context];
    imageView.image = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();

}

But how do I create a “flip/reflect” effect for any UIView, preferably keeping it’s center in the same position as before?

Thank you!

  • 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-04T06:25:03+00:00Added an answer on June 4, 2026 at 6:25 am
     [UIView beginAnimations:nil context:nil];
        [UIView setAnimationDuration:0.75];
        [UIView setAnimationDelegate:self];
        [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:self.activeView cache:YES];
        //        [self.activeView removeFromSuperview];
        [UIView commitAnimations];
    
        NSNumber* isReflected = [self.activeView.attributedView.attributes valueForKey:kIsReflected];
        if(isReflected.boolValue)
        {
            self.activeView.transform = CGAffineTransformMakeScale(1,1);
            [self.activeView.attributedView.attributes setValue: [NSNumber numberWithBool:NO]  forKey:kIsReflected];
        }else {
            //do reflection
            self.activeView.transform = CGAffineTransformMakeScale(-1,1);
            [self.activeView.attributedView.attributes setValue: [NSNumber numberWithBool:YES]  forKey:kIsReflected];
        }
    

    Above code is used for UIView Animation. Where you will get an options for various type animation.

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

Sidebar

Related Questions

How can I flip the coordinate system of an NSWindow? I know it has
Do you know of any free components/libraries, which allow to achieve a 3D flip
Does anyone know if there is a Javascript flip animation around, similar to this
I know we can flip pages horizontally using ViewPager.But is there any function which
I would like to know if it is possible to flip the contents of
Know this might be rather basic, but I been trying to figure out how
Know if it's possible to access the iPhone compass in Safari using JavaScript? I
I know what I asking might not make a lot of sense for C#
I know that it's a subject that can raise a lot of debate, but
I know this is fairly subjective, but I'm diving into testing and learning about

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.