In iOS7 Text Magnifier isn't working app wide

◇◆丶佛笑我妖孽 提交于 2019-11-28 06:59:19

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

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

We have a similar problem where we were presenting a UIWindow over the top of the existing window and if they have the same windowLevel then the loupe displays the first window added.

example:

[applicationWindow (windowLevel = 0] <------------- [customWindow (windowLevel = 0)]

customWindow renders on top of applicationWindow just fine...but a loupe displayed over a textfield in custom window renders the contents of applicationWindow.

[applicationWindow (windowLevel = 1] <------------- [customWindow (windowLevel = 1)]

Same result. customWindow renders on top of applicationWindow just fine...but a loupe displayed over a textfield in custom window renders the contents of applicationWindow.

[applicationWindow (windowLevel = 0] <------------- [customWindow (windowLevel = 1.01)]

customWindow renders correctly, contents of loupe render correctly.

The way we solved it is by initing customWindow.windowLevel to be UIApplication sharedApplication].keyWindow.windowLevel + .01 (but this could be anything) before making our customWindow the keyWindow. Thanks @user2940692, your answer should probably be the accepted one... if you want it, i'll post our case as a question, you can answer it and I'll give you credit.

I had the same issue. I found that in Project -> Targets -> General that there was a nib listed in the "Main Interface". Once I removed that it works fine. I also tried setting the window level, and it worked, but it was just masking the true problem for me.

If you did not get any help from the above solutions, I found another problem which can cause this to happen. I had a UIWindow object in nib which was initialized in AppDelegate. That view had background color as [UIColor whiteColor]. Setting it to [UIColor clearColor] will resolve this problem.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!