Skip to content
This repository was archived by the owner on Jan 7, 2026. It is now read-only.
Open
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
54 changes: 38 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,52 +21,74 @@ jobs:
- uses: actions/checkout@v2
- name: Run tests
run: swift test --enable-test-discovery --enable-code-coverage | xcpretty
build-ventura:
build-sonoma:
strategy:
matrix:
xcode:
- '14.3.1'
- '15.2'
runs-on: macos-13
- '15.4'
runs-on: macos-14
steps:
- uses: actions/checkout@v2
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Run Build
run: swift build
unit_test-ventura:
unit_test-sonoma:
strategy:
matrix:
xcode:
- '14.3.1'
- '15.2'
runs-on: macos-13
- '15.4'
runs-on: macos-14
steps:
- uses: actions/checkout@v2
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Run tests
run: swift test --enable-test-discovery --enable-code-coverage | xcpretty
build-sonoma:

build-sequioa:
strategy:
matrix:
xcode:
- '15.4'
- '16.1'
runs-on: macos-14
- '16.4'
runs-on: macos-15
steps:
- uses: actions/checkout@v2
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Run Build
run: swift build
unit_test-sonoma:
unit_test-sequioa:
strategy:
matrix:
xcode:
- '15.4'
- '16.1'
runs-on: macos-14
- '16.4'
runs-on: macos-15
steps:
- uses: actions/checkout@v2
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Run tests
run: swift test --enable-test-discovery --enable-code-coverage | xcpretty

build-tahoe:
strategy:
matrix:
xcode:
- '26.0'
runs-on: macos-26
steps:
- uses: actions/checkout@v2
- name: Select Xcode ${{ matrix.xcode }}
run: sudo xcode-select -s /Applications/Xcode_${{ matrix.xcode }}.app
- name: Run Build
run: swift build
unit_test-tahoe:
strategy:
matrix:
xcode:
- '26.0'
runs-on: macos-26
steps:
- uses: actions/checkout@v2
- name: Select Xcode ${{ matrix.xcode }}
Expand Down
4 changes: 4 additions & 0 deletions Sources/TPTweak/TPTweakGroupViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@ public final class TPTweakGroupViewController: UIViewController {

setupView()

if #available(iOS 11.0, *) {
table.contentInsetAdjustmentBehavior = .always
}

data = fetchUserDefinedRows()

table.reloadData()
Expand Down
22 changes: 22 additions & 0 deletions Sources/TPTweak/TPTweakOptionsViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,28 @@ internal final class TPTweakOptionsViewController<ValueType>: UIViewController,

override internal func viewDidLoad() {
super.viewDidLoad()

if #available(iOS 11.0, *) {
table.contentInsetAdjustmentBehavior = .always
}

if #available(iOS 13.0, *) {
let appearance = UINavigationBarAppearance()
appearance.configureWithDefaultBackground()
appearance.titleTextAttributes = [.foregroundColor: UIColor.label]
appearance.largeTitleTextAttributes = [.foregroundColor: UIColor.label]

navigationItem.standardAppearance = appearance
navigationItem.compactAppearance = appearance

let scrollEdgeAppearance = UINavigationBarAppearance()
scrollEdgeAppearance.configureWithTransparentBackground()
scrollEdgeAppearance.titleTextAttributes = [.foregroundColor: UIColor.label]
scrollEdgeAppearance.largeTitleTextAttributes = [.foregroundColor: UIColor.label]

navigationItem.scrollEdgeAppearance = scrollEdgeAppearance
}

table.reloadData()
}

Expand Down
29 changes: 21 additions & 8 deletions Sources/TPTweak/TPTweakPickerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -115,16 +115,29 @@ internal final class TPTweakPickerViewController: UIViewController {

override internal func viewDidLoad() {
super.viewDidLoad()
table.reloadData()
}

override internal func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)

if #available(iOS 12.0, *) {
navigationController?.navigationBar.prefersLargeTitles = false
navigationController?.navigationItem.largeTitleDisplayMode = .never
if #available(iOS 11.0, *) {
table.contentInsetAdjustmentBehavior = .always
}

if #available(iOS 13.0, *) {
let appearance = UINavigationBarAppearance()
appearance.configureWithDefaultBackground()
appearance.titleTextAttributes = [.foregroundColor: UIColor.label]
appearance.largeTitleTextAttributes = [.foregroundColor: UIColor.label]

navigationItem.standardAppearance = appearance
navigationItem.compactAppearance = appearance

let scrollEdgeAppearance = UINavigationBarAppearance()
scrollEdgeAppearance.configureWithTransparentBackground()
scrollEdgeAppearance.titleTextAttributes = [.foregroundColor: UIColor.label]
scrollEdgeAppearance.largeTitleTextAttributes = [.foregroundColor: UIColor.label]

navigationItem.scrollEdgeAppearance = scrollEdgeAppearance
}

table.reloadData()
}

internal required init?(coder _: NSCoder) {
Expand Down
50 changes: 33 additions & 17 deletions Sources/TPTweak/TPTweakViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,10 @@ public final class TPTweakWithNavigatationViewController: UINavigationController
}

if #available(iOS 12.0, *) {
navigationBar.prefersLargeTitles = false
navigationBar.prefersLargeTitles = true
}

navigationBar.isTranslucent = false

if #available(iOS 13.0, *) {
navigationBar.tintColor = .systemBlue
navigationBar.titleTextAttributes = [.foregroundColor: UIColor.label]
navigationBar.barTintColor = .systemGroupedBackground
navigationBar.backgroundColor = .systemGroupedBackground
}
navigationBar.isTranslucent = true
}

public override func viewWillAppear(_ animated: Bool) {
Expand Down Expand Up @@ -134,7 +127,7 @@ public final class TPTweakViewController: UIViewController {
searchController.delegate = self
searchController.searchBar.placeholder = " Search..."
searchController.searchBar.searchBarStyle = .prominent
searchController.searchBar.isTranslucent = false
searchController.searchBar.isTranslucent = true
searchController.hidesNavigationBarDuringPresentation = false
searchController.searchBar.sizeToFit()

Expand All @@ -161,8 +154,29 @@ public final class TPTweakViewController: UIViewController {
super.viewDidLoad()

if #available(iOS 11.0, *) {
navigationController?.navigationBar.prefersLargeTitles = false
navigationItem.largeTitleDisplayMode = .never
}

if #available(iOS 13.0, *) {
let appearance = UINavigationBarAppearance()
appearance.configureWithDefaultBackground()
appearance.titleTextAttributes = [.foregroundColor: UIColor.label]
appearance.largeTitleTextAttributes = [.foregroundColor: UIColor.label]

navigationItem.standardAppearance = appearance
navigationItem.compactAppearance = appearance

let scrollEdgeAppearance = UINavigationBarAppearance()
scrollEdgeAppearance.configureWithTransparentBackground()
scrollEdgeAppearance.titleTextAttributes = [.foregroundColor: UIColor.label]
scrollEdgeAppearance.largeTitleTextAttributes = [.foregroundColor: UIColor.label]

navigationItem.scrollEdgeAppearance = scrollEdgeAppearance
}

// enable extending bottom content to create overflow effect with tabbar in ios 26 liquid glass
edgesForExtendedLayout = [.bottom, .top]

// listen to minimize the view controller
NotificationCenter.default.addObserver(
Expand Down Expand Up @@ -202,13 +216,6 @@ public final class TPTweakViewController: UIViewController {
}
}

public override func viewDidLayoutSubviews() {
super.viewDidLayoutSubviews()

// sync size to child vc
viewController?.view.frame = view.bounds
}

internal required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
Expand Down Expand Up @@ -252,6 +259,15 @@ public final class TPTweakViewController: UIViewController {
// add child
self.addChild(viewController)
view.addSubview(viewController.view)

viewController.view.translatesAutoresizingMaskIntoConstraints = false
NSLayoutConstraint.activate([
viewController.view.topAnchor.constraint(equalTo: view.topAnchor),
viewController.view.leadingAnchor.constraint(equalTo: view.leadingAnchor),
viewController.view.trailingAnchor.constraint(equalTo: view.trailingAnchor),
viewController.view.bottomAnchor.constraint(equalTo: view.bottomAnchor)
])

viewController.didMove(toParent: self)

if userChangeLayout {
Expand Down
Binary file modified assets/tptewak_settings.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/tptweak_home.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/tptweak_home_flatten.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/tptweak_number_selection_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/tptweak_string_selection_example.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.