dot dot - 1 year ago 78
iOS Question

Is it possible to put an image overlay over an entire iOS app?

I'd like to have a spotlight effect PNG image on top of my entire app. Even when the keyboard pops up.

Is this possible?

Answer Source

Add the PNG to a new window that overlays everything else:

UIWindow *totalOverlayWindow = [[UIWindow alloc] init];
totalOverlayWindow.frame = [[UIScreen mainScreen] bounds];
totalOverlayWindow.userInteractionEnabled = NO;
totalOverlayWindow.windowLevel = UIWindowLevelStatusBar + 1;
[totalOverlayWindow makeKeyAndVisible];

This window will now be above everything else.

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download