Detect if Multitasking is Available

PDF for offline use

Let us know how you feel about this

Translation Quality


0/250

Not all versions of iOS or iPhone support multi-tasking. This recipe will show how to detect if multi-tasking is supported on the device.

Recipe

Because multitasking support is dependent on both OS version and hardware, if your application relies on it and must change its behavior if multitasking support is not available, you can check to see availability via the IsMultitaskingSupported property on the UIDevice class, as shown below:

if(UIDevice.CurrentDevice.IsMultitaskingSupported)
{
   // Code dependent on multitasking.
}

Xamarin Workbook

If it's not already installed, install the Xamarin Workbooks app first. The workbook file should download automatically, but if it doesn't, just click to start the workbook download manually.