0

We have a custom MonoTouch Dialog (MT D) Element that we want to expand as we type into it.

We experienced the common MT D issue of the height not recalculating. The common solution for that is to call

this.GetContainerTableView().BeginUpdates();
this.GetContainerTableView().EndUpdates();

Stack OverFlow Question

Monotouch: Force UITableView to recalculate height of each cell without reloading data

This has always worked fine for us if even it does smell of HACK. However a user is reporting an issue on their iPhone X that means the whole MT D container (the UITableView) is being scrolled every time which causes the screen to jump.

I have tried temporarily disabling the scroll on the Element's Container and on the immediate RootElement but that made no difference.

Can anyone suggest something to stop the jumping?

Pat Long - Munkii Yebee
  • 3,592
  • 2
  • 34
  • 68

1 Answers1

0

I had tried setting scroll position back to it values before Begin and EndUpdates but was getting exceptions trying to hook the scroll event

UIKit.UIApplication.EnsureEventAndDelegateAreNotMismatched 

However this suggestion does teh resetting without using Scroll Event. Thanks Kyle Shank

http://www.kyleshank.com/2015/12/05/prevent-uitableview-from-scrolling-during-updates.html

Note: I spent about a few hours trying to hack my way out of this problem before I posted to SO . In writing the question I found the Kyke Shank solution but decided we'd all be better off if I still wrote up as a question and subsequent answer.

Pat Long - Munkii Yebee
  • 3,592
  • 2
  • 34
  • 68