I have been able to put a semitransparent view above all the other views, including the keyboard, to tint the screen using this code:
int count = [[[UIApplication sharedApplication]windows]count];
[[[UIApplication sharedApplication] windows] objectAtIndex:count-1]addSubview:tintView];
Now I've run across a problem. My app uses MessageUI.framework to display a MFMessageComposeViewController, which allows the user to send a text message. Here is where I run across the problem.
When I execute the above code in this case (when the message view is showing), it works correctly. The problem is, the user can no longer interact with the message view below it. I have been setting userinteractionenabled to NO on my tintView, but in this case it does not help the problem.
Setting the tint view hidden to YES, however, does allow interaction. Something does by changing this property allows the message view to be interacted with. Obviously I want the tintView to be visible, though.
I NSLogged the views in the topmost UIWindow and found that the UIRemoteView (which I could find no info whatsoever about but seems to be what displays the views in the MessageUI.framework) is the view not receiving the touch when the tintView is above it.
How can I allow interaction with the MFMessageComposeViewController even with another UIView displayed over it. Userinteractionenabled does not work in this case, but setting the view to hidden (which isn't what I want) does.