Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 为什么仿射缩放UIWebview会给出奇怪的结果?_Iphone_Uiwebview_Transform - Fatal编程技术网

Iphone 为什么仿射缩放UIWebview会给出奇怪的结果?

Iphone 为什么仿射缩放UIWebview会给出奇怪的结果?,iphone,uiwebview,transform,Iphone,Uiwebview,Transform,我有一个HTML5游戏,我想把它放在UIWebview中 我首先使用仿射变换旋转视图,但随后它偏离了方向,大小也不正确。我决定将框架设置为封闭视图的框架。是的。所以我遵循了连接的建议,我遇到了一个奇怪的问题,在旋转和平移之后,游戏显示得很好,但一旦我想要缩放,游戏就开始出现错误(我得到了迷幻色彩…),这当然不是预期的结果 CGAffineTransform rot = CGAffineTransformMakeRotation( M_PI/2.0); CGAffineTransform tran

我有一个HTML5游戏,我想把它放在UIWebview中

我首先使用仿射变换旋转视图,但随后它偏离了方向,大小也不正确。我决定将框架设置为封闭视图的框架。是的。所以我遵循了连接的建议,我遇到了一个奇怪的问题,在旋转和平移之后,游戏显示得很好,但一旦我想要缩放,游戏就开始出现错误(我得到了迷幻色彩…),这当然不是预期的结果

CGAffineTransform rot = CGAffineTransformMakeRotation( M_PI/2.0);
CGAffineTransform tran = CGAffineTransformMakeTranslation(0, [self statusBarFrameViewRect:self.view].size.height );
CGAffineTransform tranAndRot = CGAffineTransformConcat(rot, tran);

CGAffineTransform scale = CGAffineTransformMakeScale(self.view.frame.size.height, self.view.frame.size.width);
webView.transform = CGAffineTransformConcat(tranAndRot, scale);
// [webView setScalesPageToFit:YES]; // this line seems to do strictly nothing useful to me, whether on or off. 
//I hoped it would help the contents of the view to eventually size to the scaled view, if needed.

有人知道我在做什么吗?这太愚蠢了。

最后,我没有找到核心问题,这可能与游戏设计师使用的工具有关(Unity)

因此,我的解决方案是在横向模式下完成整个UI,并完全删除旋转/平移部分