Follow

Advanced Usage - Customizing your Splash Screen

View original article on our GitHub

You can customize the appearance of your splash screen using theSTASplashPreferences object, as describes below. In order to use splash preferences, use the showSplashAd with an initialized STASplashPreferences object.

For example - using splash preferences to choose a template mode with a "blaze" theme:

StartAppWrapperiOS.STASplashPreferences splashPreferences = new StartAppWrapperiOS.STASplashPreferences();
splashPreferences.mode = StartAppWrapperiOS.STASplashMode.STASplashModeTemplate;
splashPreferences.templateTheme = StartAppWrapperiOS.STASplashTemplateTheme.STASplashTemplateThemeBlaze;
StartAppWrapperiOS.showSplashAd(splashPreferences);

Splash Preferences API

The following API describes all customization options available for the splash screen.

►Splash screen mode

Decide whether to use user-defined or template mode.

Parameter: mode

Values:
STASplashModeUserDefined
STASplashModeTemplate

Usage:
splashPreferences.mode = StartAppWrapperiOS.STASplashMode.STASplashModeTemplate;

►Choosing splash template (for template mode)

Choose of of 6 pre-designed templates.

Parameter: templateTheme

Values:
STASplashTemplateThemeDeepBlue
STASplashTemplateThemeSky
STASplashTemplateThemeAshenSky
STASplashTemplateThemeBlaze
STASplashTemplateThemeGloomy
STASplashTemplateThemeOcean

Usage:
splashPreferences.templateTheme = STASplashTemplateThemeBlaze;

►Changing template's icon and title (for template mode)

The SDK uses your default application's name and icon. You can choose however to use your own assets.

Parameters:
templateIconImageName
templateAppName

Usage:

splashPreferences.templateIconImageName = "MyIcon";
splashPreferences.templateAppName = "MyAppName";

►Choose loading indicator's type (for user-defined and template modes)

Choose which loading indicator type to display: iOS default activity indicator or a "dots" loading indicator

Parameter: loadingIndicatorType

Values:
STASplashLoadingIndicatorTypeIOS
STASplashLoadingIndicatorTypeDots

Usage:
splashPreferences.loadingIndicatorType = STASplashLoadingIndicatorTypeDots;

►Change loading indicator's position (for user-defined mode)

The loading indicator is displayed by default on the center of the screen. You can choose however to set a custom position.

Parameter:
loadingIndicatorCenterPoint.x
loadingIndicatorCenterPoint.y

Usage:

splashPreferences.loadingIndicatorCenterPoint.x = 30;
splashPreferences.loadingIndicatorCenterPoint.y = 30;

 

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments