The introduction of iOS 8 presents a new opportunity for iOS developers to take advantage of the blur view introduced in iOS 7. By popular demand, Crosslight 3 includes the support to show translucent visual effect when performing navigation, particularly designed for modal navigation mode.
This page shows how to enable translucency visual effect in modal navigation iOS using Crosslight 3.
Create View for Modal Presentation
The first step is to create a view (also known as interface definition typically with .xib extension) for the modal popup. Add a UIView and named it as About_Light.xib. Double click the About_Light.xib file in Xamarin Studio and it will open up Xcode. In this sample, the xib looks like the following illustration.
Override EnableBlurEffect Property
You can enable translucency with just a simple property set on supported Crosslight's view controllers. Once you have create the view, then enable the EnableBlurEffect property in the view controller.
The translucency visual effect in modal navigation supports three kind of translucency – light, extra light, and dark. Override BlurEffectStyle property and choose the best UIBlurEffectStyle that suits with your view.
The translucent features are currently supported in the following view controllers:
Also note that the translucent effect only works when presented in modal navigation mode. For more information, see Performing Modal Navigation.
Configure NavigationMode to Modal
After enabling translucent modal navigation, then set the NavigationMode to Modal in the ViewModel.
The following example shows how to do this.
After saving all the changes, you should see the result similar to the following images.
The sample code for this article can be downloaded from our Git server: http://git.intersoftpt.com/projects/CROS-SUPP/repos/ios-translucent-modal-navigation/browse.