1
当有Delete
按钮出现时,是否有人知道调整子视图的大小(I.E。UILabelView)的方法。当“删除”按钮出现时,UITableViewCell重新组织子视图
可能有两种方法:
1.Capture的通知,如果有一,当按钮出现在的UITableViewCell 2.Tell框架重新人气指数,它会自动。
当有Delete
按钮出现时,是否有人知道调整子视图的大小(I.E。UILabelView)的方法。当“删除”按钮出现时,UITableViewCell重新组织子视图
可能有两种方法:
1.Capture的通知,如果有一,当按钮出现在的UITableViewCell 2.Tell框架重新人气指数,它会自动。
在你的UITableViewCell类的.m文件中使用layoutSubviews。这就是所谓的每次细胞大小时,将出现删除按钮/消失,更多:
- (void) layoutSubviews {
[super layoutSubviews];
frame = self.contentView.bounds; ///this is the availalbe space for the cell
///it's automatically adjusted when the delte button appears
///so use it to resize all of your interface elements
}
您还可以使用if (self.editing) {
layoutSubviews内进行更多的控制。