當(dāng)使用UIScrollView和其子類UITableView竖哩、UITextView之類的時(shí)候,可以簡(jiǎn)單的設(shè)置ScrollView的屬性keyboardDismissMode,最低支持iOS7
typedef NS_ENUM(NSInteger, UIScrollViewKeyboardDismissMode) {
UIScrollViewKeyboardDismissModeNone,
UIScrollViewKeyboardDismissModeOnDrag, // dismisses the keyboard when a drag begins
UIScrollViewKeyboardDismissModeInteractive, // the keyboard follows the dragging touch off screen, and may be pulled upward again to cancel the dismiss
} NS_ENUM_AVAILABLE_IOS(7_0);
UIScrollViewKeyboardDismissModeOnDrag
ScrollView拖動(dòng)的時(shí)候消失
UIScrollViewKeyboardDismissModeInteractive
交互式效果,拖動(dòng)ScrollView可以使鍵盤移出屏幕范圍糙臼,可取消