Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In iOS7 Text Magnifier isn't working app wide

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).

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

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.

Any help would be greatly appreciated.

enter image description here

like image 564
piltdownman7 Avatar asked Sep 26 '13 22:09

piltdownman7


People also ask

How do I get the Magnifier icon on my iPhone?

Turn on Magnifier (If you don't see the Magnifier app icon on the Home Screen, go to App Library, then look in the Utilities folder.) Use accessibility shortcuts. next to Magnifier.) Tap the back of iPhone.

Why is magnifier app on my iPhone?

Magnifier uses your iPhone's built-in camera to enlarge objects or text so you can view them more easily. The app allows you to increase the zoom level and turn on the flashlight to better display objects and text.


2 Answers

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;

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

like image 81
Bms270 Avatar answered Sep 28 '22 10:09

Bms270


Had the same issue when using multiple windows at once. Setting correct .windowLevel value for each window for correct z-sorting solved the problem.

like image 36
user2940692 Avatar answered Sep 28 '22 10:09

user2940692