zoukankan      html  css  js  c++  java
  • 设置键盘顶部显示的工具条

    - (void)createKeyboardTool
    {
        keyboardTool = [[UIToolbar alloc] initWithFrame: CGRectMake(kZero, kZero, kScreenW, 44.0f)];
        NSMutableArray *myToolBarItems = [NSMutableArray array];
    
      //创建键盘工具条上面的按钮,并设置点击事件 UIBarButtonItem
    *cancelBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemReply target:self action:@selector(cancelAction)]; UIBarButtonItem *space = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemFlexibleSpace target:self action:@selector(saveAction)]; UIBarButtonItem *saveBtn = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemDone target:self action:@selector(saveAction)]; [myToolBarItems addObject:cancelBtn]; [myToolBarItems addObject:space]; [myToolBarItems addObject:saveBtn]; keyboardTool.items = myToolBarItems; }
        //inputAccessoryView:设置键盘顶部显示的工具条;inputView:自定义键盘
    commentTextView = [[UITextView alloc]initWithFrame:CGRectMake(kZero, kZero, kScreenW, 200)]; [commentTextView becomeFirstResponder]; commentTextView.inputAccessoryView = keyboardTool;
  • 相关阅读:
    配置Log4j(非常具体)
    System.Net.WebClient.cs
    Code:获取指定汉字的首字母
    DBS:目录
    Jasper:推送 API
    Jasper-template
    Code:Base64 编码/解码
    DCloud-HTML5+:5+ App开发入门指南
    DCloud-HTML5+:barcode
    Nuget-QRCode:QRCoder
  • 原文地址:https://www.cnblogs.com/hw140430/p/3889557.html
Copyright © 2011-2022 走看看