• IQKeyboardManager和UIScrollView问题


    如果在ScrollVIew上添加UITextField 或者

    UITextView等文本编辑,要用第三方键盘IQKeyboardManager时 一定要把

    把UIScrollView作为根视图 scrollView上的textFiled 等文本编译才不会出现不可编辑的问题

    IQKeyboardManager简单使用

    1,在AppDelegate里添加

    - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {

           [[IQKeyboardManager sharedManager] setToolbarManageBehaviour:IQAutoToolbarByPosition];

        return YES;

    }

     //在使用的controller里添加

    - (void)loadView//用ScrollView

    {

        [super loadView];

        UIScrollView *scrollView = [[UIScrollView alloc] initWithFrame:[UIScreen mainScreen].bounds];

        scrollView.contentSize = CGSizeMake(self.view.frame.size.width, 1000);

        scrollView.backgroundColor=[UIColor redColor];

        self.view = scrollView;

    }

    - (void)viewDidLoad {

        [super viewDidLoad];

       

        IQKeyboardReturnKeyHandler *retuenKeyHandler = [[IQKeyboardReturnKeyHandler alloc]initWithViewController:self];

        retuenKeyHandler.lastTextFieldReturnKeyType =UIReturnKeyDone;

  • 相关阅读:
    别人好的资源路径
    是否为微信浏览器,苹果安卓判断
    iframe滚动条置顶
    hadoop之MapReduce WordCount分析
    CentOS FTP服务器权限控制
    linux之sed用法
    hdfs-over-ftp安装与配置
    mysql grant all privileges on
    Notepad++快捷键大全
    coconHashMap实现原理分析
  • 原文地址:https://www.cnblogs.com/Lrx-lizi/p/6405295.html
Copyright © 2020-2023  润新知