An iOS view-controller navigation management. No inherit, using one line code to integrate.

Overview

KGNavigationBar

KGNavigationBar license

Example

An iOS view-controller navigation management. No inherit, using one line code to integrate.


一个 iOS 控制器导航管理库. 无需继承, 一行代码即可实现集成。


Requirements

  • ARC
  • iOS 7.0+
  • Xcode 9.0+

Installation

KGNavigationBar is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'KGNavigationBar'

Features

  • 支持 UITabBar 有无场景
  • 支持缩放和系统平移效果
  • 支持全屏 Pop 返回
  • 全屏 Pop 返回支持自定义响应宽度
  • 支持单个页面禁用、开启全屏/边缘滑动 Pop
  • 支持导航栏一对一管理
  • 无需继承 UINavigationController 或者 UIViewController
  • 支持 UITabBarController 嵌套
  • 支持交互式手势 Push 页面
  • 支持便捷设置状态栏样式
  • 支持 UITabBar 高度变化
  • 适配刘海屏
  • 像使用系统 navigationItem 一样使用 kg_navigationItem

Getting Started

示例接入代码
#import <KGNavigationBar/KGNavigationBar.h>

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    
    // 非必要
    [KGNavConfigure() updateConfigure:^(KGNavigationBarConfigure *_Nonnull configure) {
        UIImage *image = [UIImage imageNamed:@"icon_back_black"];
        configure.backButtonImage = image;
        configure.backgroundColor = [[UIColor redColor] colorWithAlphaComponent:0.5];
        configure.titleColor = [UIColor whiteColor];
        configure.titleFont = [UIFont systemFontOfSize:17 weight:UIFontWeightBold];
    }];

    self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];

    KGViewController *vc = [[KGViewController alloc] init];
    UINavigationController *navc = [KGNavigationController rootVC:vc transitionRatio:0.92];

    self.window.rootViewController = navc;
    [self.window makeKeyAndVisible];
    return YES;
}

KGViewController 以及 KGNavigationController 根据实际情况替换

修改导航栏样式
self.kg_statusBarStyle = UIStatusBarStyleDefault;

self.kg_navigationBar.hidden = true;
self.kg_navLineHidden = true;
self.kg_navTitleColor = [UIColor blackColor];
self.kg_navigationItem.leftBarButtonItem = leftBarBtnItem;
self.kg_navigationItem.title = @"标题";
self.kg_navBackgroundColor = [UIColor blueColor];
self.kg_interactivePopDisabled = true;
self.kg_fullScreenPopDisabled = true;

具体使用请查看项目 Example

Effect

Example Example Example Example Example Example

Author

wangwanjie, [email protected]

License

KGNavigationBar is available under the MIT license. See the LICENSE file for more info.

You might also like...
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.

🧭 SwiftUI navigation done right

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

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

Powerful navigation in the Composable Architecture via the coordinator pattern

TCACoordinators The coordinator pattern in the Composable Architecture TCACoordinators brings a flexible approach to navigation in SwiftUI using the C

A wrapper for NavigationView and NavigationLink that makes programmatic navigation a little friendlier.

NavigatorKit A wrapper for NavigationView and NavigationLink that makes programmatic navigation a little friendlier. NavigatorKit is an opinionated wr

Cordova/Phonegap plugin for launching today's most popular navigation/ride apps to navigate to a destination.
Cordova/Phonegap plugin for launching today's most popular navigation/ride apps to navigate to a destination.

Launch Navigator Cordova/Phonegap Plugin Cordova/Phonegap plugin for launching today's most popular navigation/ride apps to navigate to a destination.

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

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

Owner
VanJay
I am a developer for iOS major, determining to be a full stack developer someday.
VanJay
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
A drop-in universal library helps you to manage the navigation bar styles and makes transition animations smooth between different navigation bar styles

A drop-in universal library helps you to manage the navigation bar styles and makes transition animations smooth between different navigation bar styles while pushing or popping a view controller for all orientations. And you don't need to write any line of code for it, it all happens automatically.

Zhouqi Mo 3.3k Dec 21, 2022
Quick code navigation for Xcode

AceJump-like plugin for Xcode QuickJump allows you navigate to any visible position in the editor. Just Toggle QuickJump, type a character and then ty

Victor Shamanov 36 Sep 4, 2020
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
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

Αθανάσιος Κεφαλάς 4 Feb 8, 2022
Models UI navigation patterns using TCA

Composable Navigation The Composable Navigation is a Swift Package that builds on top of The Composable Architecture (TCA, for short). It models UI na

Michael Heinzl 41 Dec 14, 2022
Simple and integrated way to customize navigation bar experience on iOS app.

NavKit Simple and integrated way to customize navigation bar experience on iOS app. It should save our time that we usually use to make abstraction of

Wilbert Liu 37 Dec 7, 2022
Replicating the 'clear' navigation bar style of the iOS 12 Apple TV app.

TONavigationBar TONavigationBar is an open-source subclass of UINavigationBar that adds the ability to set the background content of the navigation ba

Tim Oliver 247 Dec 7, 2022
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

Erik Lopez 7 Dec 6, 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