代码之家  ›  专栏  ›  技术社区  ›  Czar

Tianium Mobile-选择行时在TableView中反转文本颜色

  •  0
  • Czar  · 技术社区  · 16 年前

    我在玩钛合金手机。我构建了一个tableview并在iphone上进行了测试。一切正常,我为tableview启用了“selection”属性。

    我不太明白的是如何改变文字颜色,这样当一行被选中时,背景是蓝色的,文字从黑色或灰色切换到白色,这样对比度就和iphone一样。

    有什么想法吗?

    谢谢 沙皇

    1 回复  |  直到 16 年前
        1
  •  3
  •   Aaron Saunders    16 年前

    我不知道你的单元格中是否有uilabel,但处理这个问题的基本方法是通过api提供的属性

    See API Documentation

    selectedBackgroundColor - the background color to render when the row cell is selected
    selectedBackgroundImage - the background image to render when the row cell is selected
    selectedColor           - color of the row during selection
    
    推荐文章