xamarin/Xamarin.Forms

TableView Cell.ForceUpdateSize() Child Layout only appears after Tap

开放

#7,023 创建于 2019年7月30日

 (3 条评论) (0 个反应) (0 位负责人)C# (1,926 个派生)batch import
a/listviewe/5 :clock5:help wantedp/iOS 🍎t/bug :bug:up-for-grabs

仓库指标

星标
 (5,644 个星标)
PR 合并指标
 (30 天内没有已合并 PR)

描述

Description

I came across this problem trying to dynamically show a hidden cell in my TableView. I set the height of the Cell to 0 and then after conditions are met to 42 (approximately standard iOS height). After calling ForceUpdateSize() on the cell, the resizing works fine but the layout inside is hidden until i manually tap the cell in the UI.

PS: if anyone is able to help me manually call a tap on the cell i would be fine with a "hacky" solution aswell.

Steps to Reproduce

  1. Create a TableView with UnevenRows="true"
  2. Create a cell inside the TableView, set it's height to Zero
  3. Set the cells height to a certain number like 42 and call ForceUpdateSize()
  4. The layout inside the cell is hidden.

Expected Behavior

The layout inside the cell should be visible.

Actual Behavior

The layout inside the cell is hidden until i tap it.

Basic Information

  • Version with issue: Xamarin.iOS Version: 12.10.0.157 (Visual Studio Community)
  • Last known good version: /
  • IDE: Visual Studio Community 2019 for Mac Version 8.1.5 (build 9)
  • Platform Target Frameworks:
    • iOS: 12.10.0.157
  • Affected Devices: iPhone 8 Plus

Screenshots

https://i.stack.imgur.com/iUF77.gif

贡献者指南