iOS:屏幕上的镜像内容 [英] iOS: Mirror content on screen

查看:199
本文介绍了iOS:屏幕上的镜像内容的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道是否可以在同一设备中翻转 UIView 的内容;不是外接显示器,而是设备本身。

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.

我在google上搜索了一下,但我能找到的只是外屏。

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

推荐答案

您可以将CGAffineTransformMakeScale与负值一起使用。
赞:

You can use CGAffineTransformMakeScale with negative values. Like:

CGAffineTransformMakeScale(1.0, -1.0);

这可以在视图上应用:

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

//Mirror Left to Right
view.transform = CGAffineTransformMakeScale(-1.0, 1.0);

这篇关于iOS:屏幕上的镜像内容的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆