Skip to content

非公式 / UnofficialCloudflare, Inc. 非提携。アカウント情報は入力しないでください。Not affiliated with Cloudflare, Inc. Do not enter Cloudflare credentials here.Official docsこのサイトについてプライバシー

RtkNavigationBar

最終更新 Markdown で表示Agent セットアップ

タイトルラベルと、閉じるボタンまたは戻るボタンを備えたナビゲーションバーです。 チャット、投票、参加者一覧などのモーダル画面で使います。

イニシャライザーのパラメーター

パラメーター 型 必須 デフォルト 説明
title String ✅ - ナビゲーションバーに表示するタイトルテキスト

プロパティ

プロパティ 型 必須 デフォルト 説明
titleLabel RtkLabel - - ナビゲーションバーのタイトルを表示するラベル(読み取り専用)
leftButton RtkControlBarButton - - 左側の閉じるボタンまたは戻るボタン(読み取り専用)

メソッド

メソッド 戻り値の型 説明
setBackButtonClick(callBack:) Void 戻るボタンまたは閉じるボタンのタップハンドラーを設定します

使用例

基本的な使い方

import RealtimeKitUI

let navBar = RtkNavigationBar(title: "Participants")
view.addSubview(navBar)

戻るボタンのハンドラーを指定する場合

import RealtimeKitUI

let navBar = RtkNavigationBar(title: "Chat")
navBar.setBackButtonClick {
    self.dismiss(animated: true)
}
view.addSubview(navBar)

役に立ちましたか?