Condition to switch web context for IOS device appium 1.6.4

I am using appium 1.6.4 version to run tests on IOS device.

I have noticed that the webview context keeps on changing for each page after the page load.

On what condition can we identify that the page has loaded and then switch contexts or is there any other way for switching web contexts after each page load.