UITableView重新排序隐藏背景 [英] UITableView reorder hides background

查看:70
本文介绍了UITableView重新排序隐藏背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个 UITableView ,实现重新排序控制。这一切都很好,除了一件事。当我拖动单元格时,所有 UIView 子视图都被隐藏。有办法防止这种情况发生吗?我试图添加一个 UIImage 为背景(半透明)出现时,进入编辑模式,但导致另一个问题,图像的大小调整到左侧手柄。

I have a UITableView that implements the reorder controls. It all works great with the exception of one thing. When I drag the cell, all UIView subviews are hidden. Is there a way to prevent that from happening? I tried to add a UIImage for the background (semi-transparent) to appear when you enter edit mode, but that caused another issue where the image was resized to the left side of the handles.

推荐答案

您可以设置 backgroundView UITableViewCell ,并将子视图添加到 backgroundView http://developer.apple.com/library/ios/documentation/uikit/reference/ UITableViewCell_Class / Reference / Reference.html#// apple_ref / occ / instp / UITableViewCell / backgroundView

You could set the backgroundView of UITableViewCell and add the subviews to the backgroundView: http://developer.apple.com/library/ios/documentation/uikit/reference/UITableViewCell_Class/Reference/Reference.html#//apple_ref/occ/instp/UITableViewCell/backgroundView

这篇关于UITableView重新排序隐藏背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆