Changed dismissWithClickedButtonIndex: to perform block after tearDown, as keyWindow is never re-enabled on main window if the block displays a UIAlertView.