<kbd id="afajh"><form id="afajh"></form></kbd>
<strong id="afajh"><dl id="afajh"></dl></strong>
    <del id="afajh"><form id="afajh"></form></del>
        1. <th id="afajh"><progress id="afajh"></progress></th>
          <b id="afajh"><abbr id="afajh"></abbr></b>
          <th id="afajh"><progress id="afajh"></progress></th>

          IGAutoCompletionToolbar創(chuàng)建具有自動(dòng)完成功能的文本輸入框

          聯(lián)合創(chuàng)作 · 2023-09-26 19:23

          IGAutoCompletionToolbar 是 UICollectionView 的子類用于創(chuàng)建具有自動(dòng)完成功能的文本輸入框。自動(dòng)完成的列表顯示在輸入鍵盤之上。類似各種輸入法。

          要求

          iOS 7或更高版本(帶ARC)。

          安裝

          如果使用的是 CocoaPods,請(qǐng)將“ IGAutoCompletionToolbar”添加到 Podfile 中:

          pod 'IGAutoCompletionToolbar', '~> 0.2.1'
          

          否則,下載項(xiàng)目并在 IGAutoCompletionToolbar / * 和 'QuartzCore' 框架下將文件添加到你的項(xiàng)目。

          用法

          在應(yīng)用程序中導(dǎo)入 IGAutoCompletionToolbar:

          #import "IGAutoCompletionToolbar.h"
          

          然后創(chuàng)建工具欄,并將其與文本字段連接:

          // Create the toolbar
          IGAutoCompletionToolbar* toolbar = [[IGAutoCompletionToolbar alloc] initWithFrame:CGRectMake(0,0,320,44)];
          
          // set auto complete items
          toolbar.items = @[@"Apple", @"Banana", @"Blueberry", @"Grape", @"Pineapple", @"Orange", @"Pear"];
          
          // setup the delegate
          toolbar.toolbarDelegate = self;
          
          // setup the text field to be used
          toolbar.textField = self.textfield;
          
          // set the toolbar as the input accessory view of the textfield
          self.textfield.inputAccessoryView = toolbar;
          瀏覽 19
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          評(píng)論
          圖片
          表情
          推薦
          點(diǎn)贊
          評(píng)論
          收藏
          分享

          手機(jī)掃一掃分享

          編輯 分享
          舉報(bào)
          <kbd id="afajh"><form id="afajh"></form></kbd>
          <strong id="afajh"><dl id="afajh"></dl></strong>
            <del id="afajh"><form id="afajh"></form></del>
                1. <th id="afajh"><progress id="afajh"></progress></th>
                  <b id="afajh"><abbr id="afajh"></abbr></b>
                  <th id="afajh"><progress id="afajh"></progress></th>
                  一级二级三级无码 | 99热这里只有精品99 | 99情趣网 | 国产农村XXXX做受 | 久久無語視頻 |