【问题标题】:How to realize an UiTableWiev with placeholders?如何使用占位符实现 UiTableWiev?
【发布时间】:2011-02-10 01:18:50
【问题描述】:

我怎样才能实现这样的 UiTableWiev?

http://i.stack.imgur.com/8QVb4.jpg

感谢所有给我教程的人。

像 fb 这样的桌子也可以 http://img688.imageshack.us/img688/4162/photocr.jpg

谢谢

【问题讨论】:

    标签: uitableview ios4 placeholder


    【解决方案1】:

    向你的 UITableViewCell 添加一个 UITextField。

    - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath 
    {
        /* your standard UITableView setup code */
    
        UITextField *myTextField = [[UITextField alloc] initWithFrame: CGRectMake(60, 12.7, 250, 20)];
        /* any other textField code you want to add */
        [cell addSubview: customTextField];
    
        return cell;
    }
    

    the list 的底部,您会发现TableView with File-Based Persistence,它演示了如何执行此操作。

    【讨论】:

      猜你喜欢
      • 2015-04-18
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-22
      • 1970-01-01
      • 1970-01-01
      • 2013-02-08
      • 1970-01-01
      相关资源
      最近更新 更多