使用库:IQKeyboardManager
方法:
1,pod引入:
pod 'IQKeyboardManager'
2,控制自动键盘功能启用与否:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
//默认为YES,关闭为NO
[IQKeyboardManager sharedManager].enable = YES;
}
网友评论