set useEndEditingForDismiss to YES