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. After setting your required preferences, pass it to the showSplashAd method when initializing the splash screen in yourAppDelegate class.

For example - using splash preferences to choose template mode:

startappiOS::STASplashPreferences *splashPreferences = new startappiOS::STASplashPreferences();
splashPreferences->splashMode = startappiOS::STASplashModeTemplate;
startAppBridge->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: splashMode

Values:
STASplashModeUserDefined
STASplashModeTemplate

Usage:
splashPreferences->splashMode = startappiOS::STASplashModeTemplate;

►Change splash image (for user-defined mode)

Change the splash screen image, instead of using the default one.

Parameter: splashUserDefinedImageName

Usage:
splashPreferences->splashUserDefinedImageName = @"MyImage";

►Choosing splash template (for template mode)

Choose of of 6 pre-designed templates.

Parameter: splashTemplateTheme

Values:
STASplashTemplateThemeDeepBlue
STASplashTemplateThemeSky
STASplashTemplateThemeAshenSky
STASplashTemplateThemeBlaze
STASplashTemplateThemeGloomy
STASplashTemplateThemeOcean

Usage:
splashPreferences->splashTemplateTheme = startappiOS::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:
splashTemplateIconImageName
splashTemplateAppName

Usage:

splashPreferences->splashTemplateIconImageName = "MyIcon";
splashPreferences->splashTemplateAppName = "MyAppName";

►Enable/Disable loading indicator (for user-defined mode)

Choose whether to display a loading indicator on the splash screen.

Parameter: isSplashLoadingIndicatorEnabled

Values:
YES
NO

Usage:
splashPreferences->isSplashLoadingIndicatorEnabled = true;

►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: splashLoadingIndicatorType

Values:
STASplashLoadingIndicatorTypeIOS
STASplashLoadingIndicatorTypeDots

Usage:
splashPreferences->splashLoadingIndicatorType = startappiOS::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: splashLoadingIndicatorCenterPoint

Values:
CGPointMake(x, y)

Usage:

splashPreferences->splashLoadingIndicatorCenterPoint.x = 100;
splashPreferences->splashLoadingIndicatorCenterPoint.y = 100;

►Force landscape orientation (for user-defined and template modes)

The SDK display the splash screen using the orientation supported by the application and the device real orientation. You can choose however to force landscape orientation.

Parameter: isLandscape

Values:
YES
NO

Usage:
splashPreferences->isLandscape = true;

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

Comments