TomSwift/TSAlertView — Issue #12: TSAlertView makeKeyAndVisible executing multiple times
Author: sean808080
Created: 2012-02-06 21:15:12+00:00
State: open

Just noticed this bug. The below routine gets called more than once when being setup. Not sure if it is getting hit every time a button is added but I fixed it by adding the conditional below.

From TSAlertView.m:

- (void) makeKeyAndVisible
{
if (!self.oldKeyWindow) //added this to prevent overwriting the oldKeyWindow with the TSAlertView window
self.oldKeyWindow = [[UIApplication sharedApplication] keyWindow];
self.windowLevel = UIWindowLevelAlert;
[super makeKeyAndVisible];
}

This resolved an issue I had with a UIWebView not displaying a keyboard when an editable field was getting focus.