Customize the appearance of rich media pages to make them fit your app’s style perfectly. Change the background color of your in-app messages, add some animation, or adjust the loading view to the app layout. Improve user experience with in-apps looking like a native component of the app.
Implementation
First, get an instance of the RichMediaStyle class:
iOS
Android
Background color
Make in-app messages look like an inherent part of your app by changing the background color of rich media pages displayed to the app’s users.
iOS
Android
That’s it!
Animation
Enhance the effect of your in-app messages by animating rich media appearance.
iOS
Set the animation delegate to one of the default classes:
PWRichMediaStyleSlideLeftAnimation,
PWRichMediaStyleSlideRightAnimation,
PWRichMediaStyleSlideTopAnimation,
PWRichMediaStyleSlideBottomAnimation,
PWRichMediaStyleCrossFadeAnimation.
Android
Set the animation delegate to one of the default classes:
RichMediaAnimationSlideTop,
RichMediaAnimationSlideBottom,
RichMediaAnimationSlideRight,
RichMediaAnimationSlideLeft,
RichMediaAnimationCrossFade.
To set a custom animation, implement PWRichMediaStyleAnimationDelegate method for iOS or RichMediaAnimation for Android as follows:
iOS
1. Set the animation delegate:
2. Implement PWRichMediaStyleAnimationDelegate methods (don’t forget to call a completion block):
Android
Implement RichMediaAnimation interface and set it for custom Rich Media close and open animation:
Custom loading view
Catch user attention from the first seconds with customized loading view of your In-App Messages.
iOS
1) Use loadingViewBlock as follows:
2) “LoadingView” here must inherit from PWLoadingView (defined in PWRichMediaStyle.h):
3) Set outlets:
Android
RichMediaStyle.LoadingViewCreatorInterface implements a method that returns a View to be used as a loading screen for Rich Media:
Close button enabling delay
Make sure the In-App Message is shown to users by disabling close button until the Rich Media is loaded.