iOSViewController.ViewWillDisappear

From Xojo Documentation

Method

ViewWillDisappear()

Supported for all project types and targets.

Called when the view is about to disappear because it's being closed.