6 Replies
      Latest reply on Aug 8, 2016 5:03 PM by acegreen1989 Branched from an earlier discussion.
      acegreen1989 Level 1 Level 1 (0 points)

        Let me explain my situation:

        • I have a controller that I present as a "model" view
        • I start a workoutSession when a certain event happens
        • The user preses what in my case is called "close". The back button on the top left.
        • The view dismisses as expected
        • The workoutSession is NOT ended


        So I tried to check in my didDeactivate() if a session is started, then end it. That the problem, didDeactivate is called even when the context menu is activated.

        deinit doesnt seem to be called when I dismiss the view, Even waited long enough hopeing the OS would eventually deinit the controller.


        I also dont want to wait for it to deinit. I want to preferably present an alert controller asking the user to save their workout, or worst case, just end the workout.