For the complete documentation index, see llms.txt. This page is also available as Markdown.

NavigationBar.setOptions

기능 설명

네비게이션 바의 뒤로가기·홈·타이틀 표시, 투명 여부, 배경색, 아이콘·글자 테마를 바꿔요. 넘긴 필드만 반영하고, 생략한 필드는 직전에 적용된 값을 유지해요. 처음 호출 전의 값은 미니앱 config의 navigationBar예요.

transparentBackground가 true면 네비게이션 바가 콘텐츠 위에 겹치고 레이아웃 높이를 차지하지 않아요. 이때 backgroundColor는 적용되지 않아요. backgroundColor에 null을 넘기면 테마 기본 배경색으로 돌아가요. theme은 아이콘·글자 색만 바꿔요.

타입

Params

type NavigationBarTheme = "light" | "dark";

interface SetNavigationBarOptions {
  withBackButton?: boolean;
  withHomeButton?: boolean;
  withTitle?: boolean;
  transparentBackground?: boolean;
  backgroundColor?: string | null; // `#RRGGBB` 또는 `#RRGGBBAA`
  theme?: NavigationBarTheme;
}

Response

Promise<void>;

예시 코드

도움이 되었나요?