Skip to content
This repository was archived by the owner on Jan 7, 2026. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions Sources/TPTweak/TPTweakEntry.swift
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,16 @@ extension TPTweakEntry {
type: TPTweakEntryType.switch(defaultValue: false, completion: nil)
)
}

public static var _internal_tptweak_always_show_search_bar: TPTweakEntry {
TPTweakEntry(
category: "_tptweak",
section: "Layout",
cell: "Always Show Search Bar",
footer: "",
type: TPTweakEntryType.switch(defaultValue: false, completion: nil)
)
}
}

// MARK: - indentifier helper
Expand Down
5 changes: 3 additions & 2 deletions Sources/TPTweak/TPTweakViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ public final class TPTweakViewController: UIViewController {

// setup search
navigationItem.searchController = searchController
navigationItem.hidesSearchBarWhenScrolling = true
navigationItem.hidesSearchBarWhenScrolling = !(TPTweakEntry._internal_tptweak_always_show_search_bar.getValue(Bool.self) ?? false)

// register gesture
navigationController?.navigationBar.isUserInteractionEnabled = true
Expand Down Expand Up @@ -332,7 +332,7 @@ public final class TPTweakViewController: UIViewController {

return value
} else {
return entry.cell
return entry.section
}
}

Expand Down Expand Up @@ -396,6 +396,7 @@ extension TPTweakViewController {
let entries: [TPTweakEntry] = [
._internal_tptweak_layout,
._internal_tptweak_isMinimizable,
._internal_tptweak_always_show_search_bar,
._internal_tptweak_peepOpacity,
.clearCache
]
Expand Down
Loading