Skip to content

Instantly share code, notes, and snippets.

View dch09's full-sized avatar
πŸ‘¨β€πŸ’»
cooking

Daniel Choroszucha dch09

πŸ‘¨β€πŸ’»
cooking
View GitHub Profile
@dch09
dch09 / StyledHostingController.swift
Created November 14, 2024 17:20
StyledHostingController - customised toolbars in hosted SwiftUI views
import SwiftUI
public class StyledHostingController: UIHostingController<AnyView> {
private let removeNavigationController: Bool
/// Remove duplicated navigation controller when using NavigationStack in SwiftUI views
override public var navigationController: UINavigationController? {
if removeNavigationController {
return nil
} else {
@dch09
dch09 / Bundle+Previews.swift
Created May 9, 2024 15:48
Bundle extension for SwiftUI Preview assets access
//
// Bundle+Previews.swift
//
//
// Created by Daniel Choroszucha on 08/05/2024.
//
import Foundation
extension Bundle {
@dch09
dch09 / DynamicSheetController.swift
Last active June 11, 2025 07:25
Intrinsically sized SwiftUI View based UISheetPresentationController
//
// DynamicSheetController.swift
//
//
// Created by Daniel Choroszucha on 09/05/2024.
//
import SwiftUI
import UIKit