zoukankan      html  css  js  c++  java
  • Creating a combo box for the iPhone(思路)

    In a view controller you have a UITextField and a UITableView. Assign the view controller to be the delegate of the both controls, plus the data source of the table.

    Implement the UITextField delegate methodtextField:shouldChangeCharactersInRange:replacementString: in your controller. This intercepts the changes as they are being typed in your text field. In this method, iterate through your list of possible options and store the matches in an NSMutableArray instance variable on your view controller. Then call [myTableView reloadData].

    Have your table cells generated from the array of matches you previously stored.

    It should be pretty straightforward and shouldn't take much code at all beyond a few delegate methods to get working.

    UITextField + UIButton + UITableView即可实现。

  • 相关阅读:
    低功耗计算机视觉技术前沿,四大方向,追求更小、更快、更高效
    ELECTRA中文预训练模型开源,性能依旧媲美BERT
    局部敏感哈希源代码-python
    利用局部敏感哈希改进推荐系统实时性
    局部敏感哈希算法介绍
    为什么要用局部敏感哈希
    多采用panda的数据处理方式
    delphi:文件操作
    delphi:常用函数
    delphi:打印日志
  • 原文地址:https://www.cnblogs.com/KiloNet/p/1808269.html
Copyright © 2011-2022 走看看