Added handling for switching contexts in MoaiView and MoaiAppDelegate.