iphone - 如何在仍然使用重新排序的同时摆脱 reorderControl?

标签 iphone ios ios4 uitableview

不久前I asked about how to move reorderControl View 靠近我的自定义单元格的中心,因此此 reorderControl 破坏了自定义设计。因为我不能移动这个 View 和我的单元格总是处于编辑模式 - 我只是在我的单元格背景的正确位置绘制这个 reorderControl。但现在我有两个 reorderControls ) 一个来 self 的背景,在正确的位置,一个来自 iOS。如果我将 - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath 的返回值设置为 NO,iOS reorderControl 消失但我无法再对行进行重新排序。

如何从屏幕上删除 iOS reorderControl 并仍然能够重新排序我的自定义 UITableViewCell?

ps cell.showsReorderControl=NO;不工作

最佳答案

这有点像 hack,但下面确实有效

for(UIView* view in self.subviews)
    {
        if([[[view class] description] isEqualToString:@"UITableViewCellReorderControl"])
        {
            for(UIImageView* cellGrip in view.subviews)
            {
                if([cellGrip isKindOfClass:[UIImageView class]])
                    [cellGrip setImage:nil];
            }
        }
    }

关于iphone - 如何在仍然使用重新排序的同时摆脱 reorderControl?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6897195/

相关文章:

iPhone 应用内短信 MFMessageComposeViewController 自动发送

ios - 将 NSDictionary 存储在钥匙串(keychain)中

iphone - 对核心数据中实体之间的属性进行计算

ios - 适用于 iOS 的 yalantis 标签栏

core-data - 核心数据对象在其相关对象的属性更改时更新

ios - 构建用于分发的应用程序

ios4 - map View 委托(delegate)方法 'mapView:regionDidChange:' 问题不调用

iphone - NSInteger != 无

iphone - UIViewController View -> loadView 与 viewWillAppear

iOS 应用程序在 iPhone 上看起来不错,但在 iPad 上却奇怪地放大了