Skip to content

PresentView

Francisco Dias edited this page Apr 9, 2024 · 4 revisions

PresentView

Functions

This module offers a collection of functions designed to address specific tasks and provide utilities for various purposes. Explore the available functions to make the most of the functionalities provided by this module.



Back To Top

GameCenter_PresentView_Default

This function displays the general Apple GameCenter overlay screen with information on achievements and leaderboards. This overlay will trigger a Social Async Event when closed.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Social Async Event.


Syntax:

GameCenter_PresentView_Default()

Returns:

N/A


Triggers:

Social Async Event

Key Type Description
type String The string "GameCenter_PresentView_DidFinish"
success Boolean Whether or not the task succeeded.

Example:

GameCenter_PresentView_Default();



Back To Top

GameCenter_PresentView_Achievements

This function displays the Apple GameCenter achievement overlay screen with all your achievement information. This overlay will trigger a Social Async Event when closed.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Social Async Event.


Syntax:

GameCenter_PresentView_Achievements()

Returns:

N/A


Triggers:

Social Async Event

Key Type Description
type String The string "GameCenter_PresentView_DidFinish"
success Boolean Whether or not the task succeeded.

Example:

GameCenter_PresentView_Achievements();



Back To Top

GameCenter_PresentView_Achievement

This function displays the Apple GameCenter achievement overlay screen with the information of the specified achievement. This overlay will trigger a Social Async Event when closed.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Social Async Event.


Syntax:

GameCenter_PresentView_Achievement(achievement_id)
Argument Type Description
achievement_id String The unique achievement identification string.

Returns:

N/A


Triggers:

Social Async Event

Key Type Description
type String "GameCenter_PresentView_DidFinish"
success Boolean Whether or not the task succeeded.

Example:

GameCenter_PresentView_Achievement(achievement_id);



Back To Top

GameCenter_PresentView_Leaderboards

This function displays the Apple GameCenter achievement overlay screen with all your leaderboards information. This overlay will trigger a Social Async Event when closed.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Social Async Event.


Syntax:

GameCenter_PresentView_Leaderboards()

Returns:

N/A


Triggers:

Social Async Event

Key Type Description
type String "GameCenter_PresentView_DidFinish"
success Boolean Whether or not the task succeeded.

Example:

GameCenter_PresentView_Leaderboards();



Back To Top

GameCenter_PresentView_Leaderboard

This function displays the Apple GameCenter leaderboard overlay screen with the information of a specific leaderboard. This overlay will trigger a Social Async Event when closed.

This function operates asynchronously, which means that it does not immediately return the requested result. Instead, upon completion of the task, it will trigger the Social Async Event.


Syntax:

GameCenter_PresentView_Leaderboard(id, timescope, playerscope)
Argument Type Description
id String The unique leaderboard identification string.
timescope GameCenter_Leaderboard_TimeScope The time scope to be displayed.
playerscope GameCenter_Leaderboard_PlayerScope The player scope to be displayed.

Returns:

N/A


Triggers:

Social Async Event

Key Type Description
type String "GameCenter_PresentView_DidFinish"
success Boolean Whether or not the task succeeded.

Example:

GameCenter_PresentView_Leaderboard("YYLeaderboard1", GameCenter_Leaderboard_TimeScope_AllTime, GameCenter_Leaderboard_PlayerScope_Global);


Clone this wiki locally