VEditorKit icon indicating copy to clipboard operation
VEditorKit copied to clipboard

[Bug] Unexpected _ASTableViewCell

Open GeekTree0101 opened this issue 6 years ago • 2 comments

Unexpected view(_ASTableViewCell) hammering UITextView selection function.

스크린샷 2019-03-11 오후 4 39 35 스크린샷 2019-03-11 오후 4 39 31

Expected UITableViewCell

(lldb) po self.tableNode.view.visibleCells[0].subviews[0].subviews
▿ 1 element
  - 0 : <VEditorKit.VEditorImageNode-View: 0x106ee3110; node = <VEditorKit.VEditorImageNode: 0x1079efc00>; frame = (0 0; 414 450); clipsToBounds = YES>

Unexpected UITableViewCell

(lldb) po self.tableNode.view.subviews[10].subviews[0].subviews
▿ 1 element
  - 0 : <UIImageView: 0x10f73a3f0; frame = (0 0; 0 0); userInteractionEnabled = NO; layer = <CALayer: 0x2815358e0>>

GeekTree0101 avatar Mar 11 '19 07:03 GeekTree0101

How to solve this issue?

  1. Check empty subviews UITableCellContrainerView
  2. Check UIImageView contained UITableCellContainterView
  3. Remove upper case zombie cells

        self.tableNode.performBatchUpdates({
            self.tableNode.deleteRows(at: deleteIndexPaths,
                                      with: animated ? .automatic: .none)
        }, completion: { _ in
            _ = self.tableNode.view.subviews
                .filter({ $0 is UITableViewCell })
                .filter { $0.subviews.first?.subviews.isEmpty ?? false ||
                    $0.subviews.first?.subviews.first is UIImageView }
                .map { $0.removeFromSuperview() }
        })

GeekTree0101 avatar Mar 15 '19 06:03 GeekTree0101

I just resolve about this issue at https://github.com/GeekTree0101/VEditorKit/pull/62 but, we must have to find best solution & core bug at Texture framework

GeekTree0101 avatar Apr 11 '19 09:04 GeekTree0101