dot dot - 8 months ago 35
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?


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.