在 iOS7 文本放大镜在应用程序范围内不起作用 [英] In iOS7 Text Magnifier isn't working app wide

查看:12
本文介绍了在 iOS7 文本放大镜在应用程序范围内不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的一个应用程序中遇到了一个相当烦人的错误.在 iOS7 中,当我按住 UITextView 或 UITextField 以调出放大镜时,放大区域中没有任何显示.这个问题是应用程序范围内的,唯一出现在圆圈区域的元素是键盘本身(当我将手指向下拖动到它的顶部时).

I have a came across a rather annoying bug in one of my apps. In iOS7 when I hold down on a UITextView or UITextField to bring up the Magnifying Glass, nothing shows up in the magnified area. This problem is app wide and the only element that ever shows up in the circle area is the keyboard itself (when I drag my finger down to the top of it).

我已经尝试了从只有一个 UITextView 的视图控制器到 UIWebView 的所有方法,但问题是整个应用程序.

I have tried everything from View Controllers with only a single UITextView to UIWebView and the problem is app wide.

放大镜在 iOS6 设备和 iOS7 模拟器上按预期工作.但不是在我用运行 iOS7 测试过的任何设备上.

The magnifying glass works as expected on iOS6 devices, and the iOS7 simulator. But not on any of the devices I have tested it with running iOS7.

任何帮助将不胜感激.

推荐答案

我通过在 appDelegate 中将主窗口的 windowLevel 设置为浮点值 1.2 来解决此问题:

I fixed this by setting the windowLevel of my main window to a float value of 1.2 in appDelegate:

self.window.windowLevel = 1.2;

这是 iOS7 的一种技巧,可以将主窗口的默认级别 UIWindowLevelNormal (1.0) 提高到 1.2

This is a sort of hack for iOS7 to raise the default level of your main window which is UIWindowLevelNormal (1.0) to 1.2

这篇关于在 iOS7 文本放大镜在应用程序范围内不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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