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即可实现。

  • 相关阅读:
    matplotlib的使用——scatter散点图的绘制
    OpenCVPython系列之立体图像的深度图
    YOLOv3 cfg文件详解
    Opencv的使用小教程2——Opencv常用图像处理函数汇总
    数字世界中的纸张——理解 PDF
    go channel初步
    Unity学习记录 导航
    elasticsearch的keyword与text的区别
    markdownitcontainer
    Windows 编译opensll
  • 原文地址:https://www.cnblogs.com/KiloNet/p/1808269.html
Copyright © 2011-2022 走看看