UISearchControllerWrapper.py 文件源码

python
阅读 18 收藏 0 点赞 0 评论 0

项目:PyDoc 作者: shaun-h 项目源码 文件源码
def tableView_cellForRowAtIndexPath_(sel,cmd,tableView,indexPath):
    ip = ObjCInstance(indexPath)
    ds = ObjCInstance(sel)
    data = ds.data[ip.row()]
    tv = ObjCInstance(sel)
    cell = ui.TableViewCell('subtitle')
    cell.text_label.text = data['name']
    cell.detail_text_label.text = data['docsetname']
    cell.image_view.image = data['icon']
    cell.border_color = Theme_manager.currentTheme.borderColour
    cell.background_color = Theme_manager.currentTheme.backgroundColour
    cell.bg_color = Theme_manager.currentTheme.backgroundColour
    cell.tint_color = Theme_manager.currentTheme.tintColour
    cell.text_label.text_color = Theme_manager.currentTheme.textColour
    cell.detail_text_label.text_color = Theme_manager.currentTheme.subTextColour
    selectedBackgroundView = ui.View()
    selectedBackgroundView.background_color = Theme_manager.currentTheme.cellSelectionColour
    if not Theme_manager.currentTheme.showCellSelection:
        selectedBackgroundView.alpha = 0
    cell.selected_background_view = selectedBackgroundView
    iv = ui.ImageView()
    cell.content_view.add_subview(iv)
    iv.image = data['type'].icon
    iv.width = 15
    iv.height = 15
    iv.x = cell.content_view.width - (iv.width * 2)
    iv.y = (cell.content_view.height) / 2 - (iv.height)
    iv.flex = 'L'
    return ObjCInstance(cell).ptr
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号