Pircate / Eachnavigationbar
Licence: mit
A custom navigation bar for each view controller.
Stars: ✭ 314
Programming Languages
swift
15916 projects
Projects that are alternatives of or similar to Eachnavigationbar
Xlactioncontroller
Fully customizable and extensible action sheet controller written in Swift
Stars: ✭ 3,228 (+928.03%)
Mutual labels: cocoapods, carthage
Functionkit
A framework for functional types and operations designed to fit naturally into Swift.
Stars: ✭ 302 (-3.82%)
Mutual labels: cocoapods, carthage
Jgprogresshud
An elegant and simple progress HUD for iOS and tvOS, compatible with Swift and ObjC.
Stars: ✭ 3,110 (+890.45%)
Mutual labels: cocoapods, carthage
Faceaware
An extension that gives UIImageView the ability to focus on faces within an image.
Stars: ✭ 3,004 (+856.69%)
Mutual labels: cocoapods, carthage
Passwordtextfield
A custom TextField with a switchable icon which shows or hides the password and enforce good password policies
Stars: ✭ 281 (-10.51%)
Mutual labels: cocoapods, carthage
Vulcan
Multi image downloader with priority in Swift
Stars: ✭ 291 (-7.32%)
Mutual labels: cocoapods, carthage
Imageloaderswift
A lightweight and fast image loader for iOS written in Swift.
Stars: ✭ 290 (-7.64%)
Mutual labels: cocoapods, carthage
Stepperview
SwiftUI iOS component for Step Indications.
Stars: ✭ 281 (-10.51%)
Mutual labels: cocoapods, carthage
Netfox
A lightweight, one line setup, iOS / OSX network debugging library! 🦊
Stars: ✭ 3,188 (+915.29%)
Mutual labels: cocoapods, carthage
Serpent
A protocol to serialize Swift structs and classes for encoding and decoding.
Stars: ✭ 281 (-10.51%)
Mutual labels: cocoapods, carthage
Ioniconskit
Use Ionicons in your Swift projects.
Stars: ✭ 310 (-1.27%)
Mutual labels: cocoapods, carthage
Audioindicatorbars
AIB indicates for your app users which audio is playing. Just like the Podcasts app.
Stars: ✭ 279 (-11.15%)
Mutual labels: cocoapods, carthage
Realreachability
We need to observe the REAL reachability of network. That's what RealReachability do.
Stars: ✭ 3,042 (+868.79%)
Mutual labels: cocoapods, carthage
Xcode One Dark
Atom One Dark theme for Xcode
Stars: ✭ 273 (-13.06%)
Mutual labels: cocoapods, carthage
Gemini
Gemini is rich scroll based animation framework for iOS, written in Swift.
Stars: ✭ 2,965 (+844.27%)
Mutual labels: cocoapods, carthage
Swiftprogresshud
📦 SwiftProgressHUD is a user-friendly pure swift HUD. 支持Cocoapods 及 Carthage
Stars: ✭ 290 (-7.64%)
Mutual labels: cocoapods, carthage
Kyshutterbutton
KYShutterButton is a custom button that is similar to the shutter button of the camera app
Stars: ✭ 293 (-6.69%)
Mutual labels: cocoapods, carthage
EachNavigationBar
Example
To run the example project, clone the repo, and run pod install
from the Example directory first.
Requirements
- iOS 9.0
- Swift 4.2
Installation
EachNavigationBar is available through CocoaPods or Carthage. To install it, simply add the following line to your Podfile or Cartfile:
Podfile
pod 'EachNavigationBar'
Cartfile
github "Pircate/EachNavigationBar"
Overview
Usage
Import
import EachNavigationBar
Enable
let nav = UINavigationController(rootViewController: vc)
nav.navigation.configuration.isEnabled = true
Setting
Global
nav.navigation.configuration.titleTextAttributes = [.foregroundColor: UIColor.blue]
nav.navigation.configuration.barTintColor = UIColor.red
nav.navigation.configuration.shadowImage = UIImage(named: "shadow")
nav.navigation.configuration.setBackgroundImage(UIImage(named: "nav"), for: .any, barMetrics: .default)
nav.navigation.configuration.backItem = UINavigationController.Configuration.BackItem(style: .title("返回"))
nav.navigation.configuration.prefersLargeTitles = true
nav.navigation.configuration.largeTitle.displayMode = .always
Each view controller
Normal
navigation.bar -> EachNavigationBar -> UINavigationBar
navigation.item -> UINavigationItem
// hide navigation bar
navigation.bar.isHidden = true
// remove blur effect
navigation.bar.isTranslucent = false
// hides shadow image
navigation.bar.isShadowHidden = true
// set status bar style
navigation.bar.statusBarStyle = .lightContent
// if you want change navigation bar position
navigation.bar.automaticallyAdjustsPosition = false
// item padding
navigation.bar.layoutPaddings = UIEdgeInsets(top: 0, left: 8, bottom: 0, right: 8)
// shadow
navigation.bar.shadow = Shadow(
color: UIColor.black.cgColor,
opacity: 0.5,
offset: CGSize(width: 0, height: 3)
)
Alpha
// set bar alpha
navigation.bar.alpha = 0.5
// set title alpha
navigation.bar.setTitleAlpha(0.5)
// set barButtonItem alpha
navigation.bar.setTintAlpha(0.5)
// if barButtonItem is customView
navigation.item.leftBarButtonItem?.customView?.alpha = 0.5
// if barButtonItem customized tintColor
navigation.item.leftBarButtonItem?.tintColor = navigation.item.leftBarButtonItem?.tintColor?.withAlphaComponent(0.5)
Additional height or view
// navigation bar additional height
navigation.bar.additionalHeight = 14
// navigation bar additional view
navigation.bar.additionalView = UIView()
BackBarButtonItem
// set back bar button item
navigation.bar.backBarButtonItem = .init(style: .title("Back"), tintColor: .red)
// allow back
navigation.bar.backBarButtonItem.shouldBack = { item in
// do something
return false
}
// handler before back
navigation.bar.backBarButtonItem.willBack = {
// do something
}
// handler after back
navigation.bar.backBarButtonItem.didBack = {
// do something
}
LargeTitle(iOS 11.0+)
// enable
navigation.bar.prefersLargeTitles = true
// display mode
navigation.item.largeTitleDisplayMode = .always
// alpha
navigation.bar.setLargeTitleAlpha(0.5)
Author
Pircate, [email protected]
License
EachNavigationBar is available under the MIT license. See the LICENSE file for more info.
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].