replaced alertView:didDismiss with willDismiss