Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS: Mirror content on screen

Tags:

I would like to know if it is possible to flip the contents of a UIView within the same device; meaning not to an external monitor but on the device itself.

I have searched a bit on google, but all I can find is to external screens.

like image 953
Paul Peelen Avatar asked Dec 20 '11 11:12

Paul Peelen


People also ask

Can I mirror my screen on iPhone?

Mirror your iPhone, iPad, or iPod touch to a TV or MacOn iPhone X or later or iPad with iPadOS 13 or later: Swipe down from the upper-right corner of the screen. On iPhone 8 or earlier or iOS 11 or earlier: Swipe up from the bottom edge of the screen.

Can I screen mirror from iPhone to iPad?

Answer: All iOS devices come with AirPlay that allows you to cast the screen of your one iOS device on another. You can use AirPlay to mirror your iPhone to your iPad.

Where is the mirror screen on my iPhone?

On your iPhone, swipe down from the upper right corner to open the Control Center. Tap Screen Mirroring. Select your TV from the list that appears. If a passcode appears on your TV (may happen for first-time users), enter the code on your iPhone to complete the connection.


1 Answers

You can use CGAffineTransformMakeScale with negative values. Like:

CGAffineTransformMakeScale(1.0, -1.0); 

This can be applied on the view by:

//Mirror top to bottom view.transform = CGAffineTransformMakeScale(1.0, -1.0); 

or

//Mirror Left to Right view.transform = CGAffineTransformMakeScale(-1.0, 1.0); 
like image 169
Mats Stijlaart Avatar answered Jan 11 '23 00:01

Mats Stijlaart