【问题标题】:Grey-out effect in UITableViewCells [duplicate]UITableViewCells中的灰色效果[重复]
【发布时间】:2014-01-28 22:18:33
【问题描述】:

我有一个包含容器视图的UIViewController,并且该容器链接(嵌入链接)到UITableViewController。在这个UITableViewController 里面我添加了两个UITableViewCells。当您单击单元格而不是单元格内的UIObjects 时,单元格变为灰色,只有当您选择另一个UITableViewCell 时,灰色突出显示才会消失。我尝试使用它来解决我的问题,但它会停用单元格内的UIObjects,即使您使用此代码重新激活 .userEnteractionEnabled

//Stop the UITableViewCell's from greying out
gcImageNameCell.userInteractionEnabled = NO;
gcBioCell.userInteractionEnabled = NO;

//But.. turn back on EVERYTHING ELSE
gcImageView.userInteractionEnabled = YES;
gcGroupNameTextField.userInteractionEnabled = YES;
gcGroupAcronymTextField.userInteractionEnabled = YES;
gcTextView.userInteractionEnabled = YES;

我该如何解决这个问题?

【问题讨论】:

  • 哇,伙计们,我为重复道歉,我一定是在搜索所有错误的东西。

标签: ios objective-c uitableview


【解决方案1】:

如果你只是想阻止单元格显示选择,你可以这样做

cell.selectionStyle = UITableViewCellSelectionStyleNone

否则,请澄清您的问题。

【讨论】:

    猜你喜欢
    • 2012-07-25
    • 2011-06-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-08-05
    • 2015-05-06
    • 1970-01-01
    相关资源
    最近更新 更多