1

I am currently working on a project using Xamarin and MvvmCross. I am trying to close a modal view with an animation similar to the one found here:In iOS, how to drag down to dismiss a modal?

I am fairly new to Xamarin, so I am doing my best trying to translate it from Swift. If anyone could provide some help that would be greatly appreciated!

Scout 43
  • 49
  • 1
  • 7
  • Do you need to pop a view that is binded with view model that way? Fairly easy way would be to manually inject ViewModel, and present the view like native way, PresentViewController(VC,Null,...) and then you can write a swipe down gesture to trigger an event where you can simply dismiss the controller. – Saket Kumar Sep 03 '18 at 10:26
  • Ok, but I would like to be able to control the dismissal. Like an interactive transition. I’ve created an animation and would like to have the gesture control it. Can I do that when defining the gesture? – Scout 43 Sep 03 '18 at 15:10
  • You sure can, don't call dismiss unless animation is completely. On animation finish call back call dismiss – Saket Kumar Sep 03 '18 at 18:10
  • Sweet! I’ll give it a shot! – Scout 43 Sep 03 '18 at 20:00
  • Let me know if it works, else would provide code for the same – Saket Kumar Sep 04 '18 at 07:29
  • so now, I am able to dismiss the view with a swipe; however, I am having trouble making it interactive. If you have a sample project that would very helpful. – Scout 43 Sep 04 '18 at 13:41
  • I will give u some code. – Saket Kumar Sep 04 '18 at 14:32

0 Answers0