ios 避免输入框被键盘遮挡

2020-05-09  本文已影响0人  liang1030

使用库:IQKeyboardManager

方法:

1,pod引入:
pod 'IQKeyboardManager'

2,控制自动键盘功能启用与否:

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    //默认为YES,关闭为NO
    [IQKeyboardManager sharedManager].enable = YES;
}
上一篇 下一篇

猜你喜欢

热点阅读