【问题标题】:Titanium row data selection on iPhoneiPhone上的钛行数据选择
【发布时间】:2011-04-15 11:44:50
【问题描述】:

我有一个用 Titanium.UI.TableViewRow 编写的文本。是否可以像在 Textfiled 或 textArea 中那样在选择行时复制行文本。我在行中插入了一个文本字段,但只有当我关注书面文本而不是行的任何部分时,它才会选择文本。

【问题讨论】:

    标签: iphone titanium


    【解决方案1】:

    是的..

    如果需要获取行的标题:

    rowTitle = yourTableView.data[indexOfSection, no Section=0].rows[indexOfRow].title;
    

    如果需要获取label/textfield/..的文本。

    text = yourTableView.data[indexOfSection].rows[indexOfRow].children[indexOfChild].text
    

    【讨论】:

    • 它会像文本框显示的一样显示复制选项吗?
    • 你可以尝试类似 yourTableView.fireEvent('touchstart');不知道这是否可行,或者是否是正确的触发事件
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-11-21
    • 1970-01-01
    • 2012-11-09
    相关资源
    最近更新 更多