title: Taro.setBackgroundTextStyle(option)

sidebar_label: setBackgroundTextStyle

Dynamically sets the style of the text and the loading image in the pull-down background.

Reference

Type

  1. (option: Option) => Promise<CallbackResult>

Parameters

Option

Property Type Required Description
textStyle "dark" | "light" Yes The style of the text and the loading image in the pull-down background.

Enum:
- ‘dark’: In dark style;
- ‘light’: In light style;
complete (res: CallbackResult) => void No The callback function used when the API call completed (always executed whether the call succeeds or fails)
fail (res: CallbackResult) => void No The callback function for a failed API call
success (res: CallbackResult) => void No The callback function for a successful API call

Sample Code

  1. Taro.setBackgroundTextStyle({
  2. textStyle: 'dark' // Yes | The style of the text and the loading image is dark.
  3. })

API Support

API WeChat Mini-Program H5 React Native
Taro.setBackgroundTextStyle ✔️ ✔️ (Only iOS)