Skip to main content

View/Component Customization

1 Get Host View​

Provide host View

Interface Prototype

func getGameView() -> UIView

2 Set click listener for menu button​

Provides a callback for the host menu button click

Interface Prototype

func setOnTJMenuListener(callback: @escaping () -> Void)

Parameter Description

parameterData TypeRequiredAttribute Description
callback() -> VoidYesCallback for clicking the menu button

3 Set click listener for the close button​

Provides a callback for the host close button click

Interface Prototype

func setOnTJCloseListener(callback: @escaping () -> Void)

Parameter Description

parameterData TypeRequiredAttribute Description
callback() -> VoidYesCallback for clicking the close button

4 Add Platform UI Layer Subview​

Add the subview to the platform UI layer between the host game rendering layer and the capsule button, which can be called after the host view is created

Interface Prototype

func addViewToPlatformLayer(view: UIView)

Parameter Description

parameterData TypeRequiredAttribute Description
viewUIViewYesSubview to be added

5 Remove platform UI layer subviews​

Removes subviews from the platform UI layer, which can be called after the host view is created

Interface Prototype

func removePlatformLayerView(view: UIView)

Parameter Description

parameterData TypeRequiredAttribute Description
viewUIViewYesSubview to be removed