xamarin ios dismiss detail page

hi, I've a problem, I've two page in xamarin.ios. FirstPage and SecondPage(Detail) with a counter inside. I've an unwind segue from SecondPage to FirstPage. The problem is when return to FirstPage the SecondPage counter continues in background. How to dismiss the page from stack? Thanks!



  • TedRogersTedRogers USMember ✭✭✭✭

    how are you creating your timer?
    are you passing a weak reference to your timer?

    Anyway, you could start your timer in OnViewWillAppear() and invalidate it in OnViewDidDisappear().

  • Ok but there is a method for delete the view from the stack?
  • TedRogersTedRogers USMember ✭✭✭✭

    viewControlller.DismissViewController(true, null);

    Not sure I get what you are asking.

  • I've try to create a button in controller B with DismissViewController(true, null); and return to A but timer continue in background :(

  • TedRogersTedRogers USMember ✭✭✭✭

    I believe I provided the solution above. The timer will continue to run unless you invalidate it.

Sign In or Register to comment.