All Projects → wilbertliu → NavKit

wilbertliu / NavKit

Licence: MIT License
Simple and integrated way to customize navigation bar experience on iOS app.

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language
objective c
16641 projects - #2 most used programming language

Projects that are alternatives of or similar to NavKit

Spiceypy
SpiceyPy: a Pythonic Wrapper for the SPICE Toolkit.
Stars: ✭ 218 (+489.19%)
Mutual labels:  navigation, toolkit
codemill.vmfirstnav
Xamarin.Forms ViewModel First Navigation Library
Stars: ✭ 22 (-40.54%)
Mutual labels:  navigation
Stormwater-Management-Model
Open Water Analytics Stormwater Management Model repository
Stars: ✭ 71 (+91.89%)
Mutual labels:  toolkit
kaptain
👨‍✈️ multi-module navigation on Android has never been so easier!
Stars: ✭ 24 (-35.14%)
Mutual labels:  navigation
Object-Goal-Navigation
Pytorch code for NeurIPS-20 Paper "Object Goal Navigation using Goal-Oriented Semantic Exploration"
Stars: ✭ 107 (+189.19%)
Mutual labels:  navigation
Fluent-Design
Microsoft's Fluent Design with pure HTML/CSS/JS
Stars: ✭ 36 (-2.7%)
Mutual labels:  navigation
MockAppMVVM
A sample app structure using the MVVM architecture using Retrofit, Dagger2, LiveData, RxJava, ViewModel and Room.
Stars: ✭ 14 (-62.16%)
Mutual labels:  navigation
vor-python-decoder
Decodes VOR signal from WAV file to get the bearing to your position
Stars: ✭ 33 (-10.81%)
Mutual labels:  navigation
SettingsAppInSwiftUI
I have recreated a Settings App in iPhoneXR using SwiftUI concepts such as Form,Section,Toggle,Picker,Stack..etc
Stars: ✭ 37 (+0%)
Mutual labels:  navigation
Codist
A visual studio extension which enhances syntax highlighting, quick info (tooltip), navigation bar, scrollbar, display quality and brings smart tool bar to code editor.
Stars: ✭ 134 (+262.16%)
Mutual labels:  navigation
accessible-nav-wp
An accessible menu for WordPress theme development
Stars: ✭ 26 (-29.73%)
Mutual labels:  navigation
drawer-with-bottom-navigation-architecture
Sample android kotlin project with both drawer and bottom navigation together
Stars: ✭ 42 (+13.51%)
Mutual labels:  navigation
kafka-do
Higher level abstraction for franz-go.
Stars: ✭ 21 (-43.24%)
Mutual labels:  abstraction
deep-active-learning-pytorch
A PyTorch toolkit with 8 popular deep active learning query methods implemented.
Stars: ✭ 47 (+27.03%)
Mutual labels:  toolkit
neonavigation
A 2-D/3-DOF seamless global/local mobile robot motion planner package for ROS
Stars: ✭ 199 (+437.84%)
Mutual labels:  navigation
simple-sidenav
Simple, easily customizable, animated menu.
Stars: ✭ 40 (+8.11%)
Mutual labels:  navigation
stan
🔨 Collection of front-end engineering tools
Stars: ✭ 19 (-48.65%)
Mutual labels:  toolkit
kivakit
KivaKit is a set of integrated Java mini-frameworks for everyday development.
Stars: ✭ 67 (+81.08%)
Mutual labels:  toolkit
styled-off-canvas
A simple off canvas menu built with styled-components 💅
Stars: ✭ 61 (+64.86%)
Mutual labels:  navigation
Helm
A graph-based SwiftUI router
Stars: ✭ 64 (+72.97%)
Mutual labels:  navigation

NavKit

Carthage compatible Build Status Coverage Status

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 navigation bar, back button, and so on.

Demo

Blink Navigation Bar Navigation Bar with Color Transition Navigation Bar

Installation

Carthage

github "wilbertliu/NavKit"

CocoaPods

Add the following line into the Podfile :

pod 'NavKit'

After that, run the following command :

$ pod install

Usage

Since the release of version 0.4, NavKit has a huge redesign of its API. It makes the switch of the mindset to the view controller's based navigation configuration, which means we don't need additional layer to configure the navigation experience.

There are only 3 things to do in order to use NavKit :

  1. Conforms to protocol CustomizableNavigation and UIGestureRecognizerDelegate.
  2. Define the properties that we need to customize the navigation bar like barBackgroundColor, backImage, etc.
  3. Call self.updateNavigation() wherever in view controller to update the navigation bar based on the defined properties.

Global Style

There's a time when we want to make a general style because it would be used by most of the screens. What we have to do is just make a protocol extension of CustomizableNavigation and define the properties that we want to make as global. And of course, if you override the properties on some controller, NavKit would use what's defined at controller instead. Can we jump into some codes to show?

import Foundation
import NavKit

extension CustomizableNavigation where Self: UIViewController, Self: UIGestureRecognizerDelegate {
    var titleColor: UIColor { return .red }
    var titleFont: UIFont { return UIFont.systemFont(ofSize: 16, weight: UIFontWeightMedium) }
    var backImage: UIImage? { return UIImage(named: "something") }
}

Example

Note that this section is taken from Example project. Make sure to check it to add some knowledge on how to use NavKit.

import UIKit
import NavKit

class DetailViewController: UIViewController, CustomizableNavigation, UIGestureRecognizerDelegate {
    // MARK: - Navigation Config

    var barBackgroundColor: UIColor = UIColor.blue.withAlphaComponent(0.5)
    var backText: String? = "<-- Go back"

    // MARK: - Life Cycles

    override func viewWillAppear(_ animated: Bool) {
        super.viewWillAppear(animated)
        navigationController?.navigationBar.tintColor = .white
        self.updateNavigation()
    }
}

Support

Have any feedbacks? Feel free to submit a PR! And I'm more than happy to answer questions, or maybe just some hi?! To do that, shoot me a DM or tweet @wilbertliu

License

MIT © Wilbert Liu

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].