custom navigationBar in swiftui

Overview

SwiftUI-WRNavigationBar

custom navigationBar in swiftui

Requirements

iOS 14.0

Installation

pod 'SwiftUI-WRNavigationBar', '~>1.1.1'

Overview

debug custom title view custom title view search
leadingView&trailingView foreground hidden bottom line
background image background linearGradient update background alpha
intercept back event ignore top area

Example


struct ForegroundView: View {
    var body: some View {
        WRNavigationBar {
            ListView()
        }
        .title("set foreground")
        .foreground(.white)
        .isBackButtonBlack(false)
        .background(Color.blue)
    }
}

Api

api description
foreground(_ foreground: Color) foreground
title(_ title: String) title (titleView is default)
hiddenLine(_ hidden: Bool) Is the line at the bottom of the navigationBar hidden
backButtonImageName(_ named: String) Set backButton image name
backButtonHidden(_ hidden: Bool) Is the backButton hidden
isBackButtonBlack(_ isBlack: Bool) Is the backButton black style
ignoringTopArea(_ ignore: Bool) Is the content align with the top of the navigationBar
maxWidth(leading: CGFloat = 80, trailing: CGFloat = 80) Max width of leadingView and max width of trailingView
background(_ background: Background) background
backButtonTapAction(_ tapAction: @escaping WRBlock) backButton intercept( hasBackButton == true)
debug(_ debug: Bool) debug
navigationBarTitleView(@ViewBuilder titleView: () -> Content) titleView
wrNavigationBarItems(leading:xx, trailing:xx) navigationBarItems leading & trailing
wrNavigationBarItems(@ViewBuilder leading: () -> Content) navigationBarItems leading
wrNavigationBarItems(trailing: () -> Content) navigationBarItems trailing

More

扫码回复1获取面试资料(持续更新)

License

SwiftUI-WRNavigationBar is available under the MIT license. See the LICENSE file for more info.

You might also like...
Router is a library that assists with SwiftUI view transitions.
Router is a library that assists with SwiftUI view transitions.

Router Router is a library that assists with SwiftUI view transitions. Installation .package(name: "Router", url: "[email protected]:1amageek/Router.git"

NavigationViewKit is a NavigationView extension library for SwiftUI.

NavigationViewKit 中文版说明 NavigationViewKit is a NavigationView extension library for SwiftUI. For more detailed documentation and demo, please visit 用N

Navigation helpers for SwiftUI applications build with ComposableArchitecture
Navigation helpers for SwiftUI applications build with ComposableArchitecture

Swift Composable Presentation 📝 Description Navigation helpers for SwiftUI applications build with ComposableArchitecture. More info about the concep

Make SwiftUI Navigation be easy

VNavigator VNavigator is a clean and easy-to-use navigation in SwiftUI base on UINavigationController in UIKit Installation From CocoaPods CocoaPods i

Tools for making SwiftUI navigation simpler, more ergonomic and more precise.
Tools for making SwiftUI navigation simpler, more ergonomic and more precise.

SwiftUI Navigation Tools for making SwiftUI navigation simpler, more ergonomic and more precise. Motivation Tools Navigation overloads Navigation view

SwiftUINavigation provides UIKit-like navigation in SwiftUI

SwiftUINavigation About SwiftUINavigation provides UIKit-like navigation in Swif

A lightweight iOS mini framework that enables programmatic navigation with SwiftUI, by using UIKit under the hood.

RouteLinkKit A lightweight iOS mini framework that enables programmatic navigation with SwiftUI. RouteLinkKit is fully compatible with native Navigati

SwiftUINavigator: a lightweight, flexible, and super easy library which makes SwiftUI navigation a trivial task
SwiftUINavigator: a lightweight, flexible, and super easy library which makes SwiftUI navigation a trivial task

The logo is contributed with ❤️ by Mahmoud Hussein SwiftUINavigator is a lightwe

Simple iOS app to showcase navigation with coordinators in SwiftUI + MVVM.
Simple iOS app to showcase navigation with coordinators in SwiftUI + MVVM.

SimpleNavigation Simple iOS app to showcase the use of the Coordinator pattern using SwiftUI and MVVM. The implementation is as easy as calling a push

Owner
wangrui460
可持续开发、刻意练习
wangrui460
Simple custom navigation bar by swift

YoNavBarView Example To run the example project, clone the repo, and run pod install from the Example directory first. Requirements Installation YoNav

null 1 Nov 23, 2021
Navigator - A sample custom car navigator with all main opportunities of popular ones

Navigator A sample custom car navigator with all main opportunities of popular o

Neo 1 Apr 4, 2022
sRouting - The lightweight navigation framework for SwiftUI.

sRouting The lightweight navigation framework for SwiftUI. Overview sRouting using the native navigation mechanism in SwiftUI. It's easy to handle nav

Shiro 8 Aug 15, 2022
FlowStacks allows you to hoist SwiftUI navigation and presentation state into a Coordinator

FlowStacks allow you to manage complex SwiftUI navigation and presentation flows with a single piece of state. This makes it easy to hoist that state into a high-level coordinator view. Using this pattern, you can write isolated views that have zero knowledge of their context within the navigation flow of an app.

John Patrick Morgan 471 Jan 3, 2023
Change SwiftUI Navigation Bar Color for different View

SwiftUINavigationBarColor Change SwiftUI NavigationBar background color per screen. Usage For NavigationBarColor to work, you have to set the Navigati

Hai Feng Kao 18 Jul 15, 2022
Path based routing in SwiftUI

Easy and maintainable app navigation with path based routing for SwiftUI. With SwiftUI Router you can power your SwiftUI app with path based routing.

Freek 652 Dec 28, 2022
An open source library for building deep-linkable SwiftUI applications with composition, testing and ergonomics in mind

Composable Navigator An open source library for building deep-linkable SwiftUI applications with composition, testing and ergonomics in mind Vanilla S

Bahn-X 539 Jan 8, 2023
Coordinators in SwiftUI. Simple, powerful and elegant.

Simple, powerful and elegant implementation of the Coordinator pattern in SwiftUI. Stinsen is written using 100% SwiftUI which makes it work seamlessl

Narek Mailian 618 Jan 7, 2023
An alternative SwiftUI NavigationView implementing classic stack-based navigation giving also some more control on animations and programmatic navigation.

swiftui-navigation-stack An alternative SwiftUI NavigationView implementing classic stack-based navigation giving also some more control on animations

Matteo 753 Jan 2, 2023
🧭 SwiftUI navigation done right

?? NavigationKit NavigationKit is a lightweight library which makes SwiftUI navigation super easy to use. ?? Installation ?? Swift Package Manager Usi

Alex Nagy 152 Dec 27, 2022