Topics   All   MacOS (Only)   Windows (Only)   Linux (Only, Not)   iOS (Only, Not)  
Components   Crossplatform Mac & Win   Server   Client   Old   Deprecated   Guides   Examples   Videos
New in version: 12.2   12.3   12.4   12.5   13.0   13.1   13.2   13.3   13.4   13.5    Statistic    FMM    Blog  

GameKit.GameCenterView.SetViewState

Sets the view state.

Component Version macOS Windows Linux Server iOS SDK
GameKit 8.5 ✅ Yes ❌ No ❌ No ❌ No ✅ Yes
MBS( "GameKit.GameCenterView.SetViewState"; ViewState )   More

Parameters

Parameter Description Example
ViewState The view state to use.
Can be Leaderboards, Achievements, Challenges or Default.
"Leaderboards"

Result

Returns OK or error.

Description

Sets the view state.
The content displayed by the Game Center controller.

When you first present the Game Center view controller, the content displayed by the view controller is determined by this property. If the player navigates to different content, the view state is automatically updated. For example, to preserve the player’s selections, you can read the viewState property after the screen is dismissed, and set that value the next time you initialize the view controller.

Value can be Default, Leaderboards, Achievements or Challenges.

See also

This function is free to use.

Created 5th November 2018, last changed 8th November 2018


GameKit.GameCenterView.SetScriptTrigger - GameKit.GameCenterView.ShowBannerWithTitle

💬 Ask a question or report a problem