├── .github
└── workflows
│ └── ci.yml
├── .gitignore
├── .swiftpm
└── xcode
│ └── package.xcworkspace
│ └── contents.xcworkspacedata
├── LICENSE
├── Package.swift
├── README.md
├── Sources
├── NavigationBar.swift
├── Proxy.swift
├── Style.swift
├── SwiftyNavigationBar.swift
├── UINavigationController+SwiftyNavigationBar.swift
└── UIViewController+SwiftyNavigationBar.swift
├── SwiftyNavigationBar.podspec
├── SwiftyNavigationBar_Demo
├── Podfile
├── Podfile.lock
├── Pods
│ ├── Headers
│ │ └── Public
│ │ │ └── SwiftyNavigationBar
│ │ │ ├── SwiftyNavigationBar-umbrella.h
│ │ │ └── SwiftyNavigationBar.modulemap
│ ├── Local Podspecs
│ │ └── SwiftyNavigationBar.podspec.json
│ ├── Manifest.lock
│ ├── Pods.xcodeproj
│ │ └── project.pbxproj
│ └── Target Support Files
│ │ ├── Pods-SwiftyNavigationBar_Demo
│ │ ├── Pods-SwiftyNavigationBar_Demo-acknowledgements.markdown
│ │ ├── Pods-SwiftyNavigationBar_Demo-acknowledgements.plist
│ │ ├── Pods-SwiftyNavigationBar_Demo-dummy.m
│ │ ├── Pods-SwiftyNavigationBar_Demo-umbrella.h
│ │ ├── Pods-SwiftyNavigationBar_Demo.debug.xcconfig
│ │ ├── Pods-SwiftyNavigationBar_Demo.modulemap
│ │ └── Pods-SwiftyNavigationBar_Demo.release.xcconfig
│ │ └── SwiftyNavigationBar
│ │ ├── SwiftyNavigationBar-dummy.m
│ │ ├── SwiftyNavigationBar-prefix.pch
│ │ ├── SwiftyNavigationBar-umbrella.h
│ │ ├── SwiftyNavigationBar.debug.xcconfig
│ │ ├── SwiftyNavigationBar.modulemap
│ │ ├── SwiftyNavigationBar.release.xcconfig
│ │ └── SwiftyNavigationBar.xcconfig
├── SwiftyNavigationBar_Demo.xcodeproj
│ ├── project.pbxproj
│ └── project.xcworkspace
│ │ ├── contents.xcworkspacedata
│ │ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
├── SwiftyNavigationBar_Demo.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── SwiftyNavigationBar_Demo
│ ├── AppDelegate.swift
│ ├── Assets.xcassets
│ ├── AppIcon.appiconset
│ │ └── Contents.json
│ ├── Contents.json
│ ├── ts_bg.imageset
│ │ ├── 05576479b7d850e2879e03c10e0cb83e.jpg
│ │ └── Contents.json
│ └── ts_nb.imageset
│ │ ├── Contents.json
│ │ └── c5fb17263fd0a84889bf939238cda6e7.jpg
│ ├── Base.lproj
│ └── LaunchScreen.storyboard
│ ├── Info.plist
│ ├── MineViewController.swift
│ ├── SettingViewController.swift
│ └── TableViewDelegate.swift
└── images
├── alpha.gif
├── backgroundAlpha.gif
├── backgroundEffect.gif
├── isWhiteBarStyle.gif
├── shadowImageAlpha.gif
├── tintColor.gif
├── use1.gif
└── use2.gif
/.github/workflows/ci.yml:
--------------------------------------------------------------------------------
1 | name: SwiftyNavigationBar CI
2 | on:
3 | push:
4 | paths:
5 | - '**.swift'
6 | - '**.podspec'
7 |
8 | jobs:
9 | iOS:
10 | name: Test iOS
11 | runs-on: macOS-latest
12 | env:
13 | DEVELOPER_DIR: /Applications/Xcode_11.1.app/Contents/Developer
14 | strategy:
15 | matrix:
16 | destination: ["OS=13.1,name=iPhone 11 Pro"] #, "OS=12.4,name=iPhone XS", "OS=11.4,name=iPhone X", "OS=10.3.1,name=iPhone SE"]
17 | steps:
18 | - uses: actions/checkout@v2
19 | - name: iOS
20 | run: |
21 | pod install
22 | xcodebuild -workspace "SwiftyNavigationBar_Demo.xcworkspace" -scheme "SwiftyNavigationBar_Demo" -destination "platform=iOS" clean test | xcpretty
23 | working-directory: SwiftyNavigationBar_Demo
24 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Xcode
2 | #
3 | # gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore
4 |
5 | ## Build generated
6 | build/
7 | DerivedData/
8 |
9 | ## Various settings
10 | *.pbxuser
11 | !default.pbxuser
12 | *.mode1v3
13 | !default.mode1v3
14 | *.mode2v3
15 | !default.mode2v3
16 | *.perspectivev3
17 | !default.perspectivev3
18 | xcuserdata/
19 |
20 | ## Other
21 | *.moved-aside
22 | *.xccheckout
23 | *.xcscmblueprint
24 | *.DS_Store
25 | *.icloud
26 |
27 | ## Obj-C/Swift specific
28 | *.hmap
29 | *.ipa
30 | *.dSYM.zip
31 | *.dSYM
32 |
33 | ## Playgrounds
34 | timeline.xctimeline
35 | playground.xcworkspace
36 |
37 | # Swift Package Manager
38 | #
39 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
40 | # Packages/
41 | # Package.pins
42 | # Package.resolved
43 | .build/
44 |
45 | # CocoaPods
46 | #
47 | # We recommend against adding the Pods directory to your .gitignore. However
48 | # you should judge for yourself, the pros and cons are mentioned at:
49 | # https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
50 | #
51 | # Pods/
52 |
53 | # Carthage
54 | #
55 | # Add this line if you want to avoid checking in source code from Carthage dependencies.
56 | # Carthage/Checkouts
57 |
58 | Carthage/Build
59 |
60 | # fastlane
61 | #
62 | # It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
63 | # screenshots whenever they are needed.
64 | # For more information about the recommended setup visit:
65 | # https://docs.fastlane.tools/best-practices/source-control/#source-control
66 |
67 | fastlane/report.xml
68 | fastlane/Preview.html
69 | fastlane/screenshots/**/*.png
70 | fastlane/test_output
71 |
--------------------------------------------------------------------------------
/.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2019 wlgemini
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version:5.2
2 | // The swift-tools-version declares the minimum version of Swift required to build this package.
3 |
4 | import PackageDescription
5 |
6 | let package = Package(
7 | name: "SwiftyNavigationBar",
8 | platforms: [.iOS(.v8)],
9 | products: [
10 | .library(name: "SwiftyNavigationBar", targets: ["SwiftyNavigationBar"]),
11 | ],
12 | targets: [
13 | .target(name: "SwiftyNavigationBar", path: "Sources")
14 | ],
15 | swiftLanguageVersions: [.v5]
16 | )
17 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # SwiftyNavigationBar
2 |
3 | [](https://github.com/wlgemini/SwiftyNavigationBar/actions)
4 | [](https://cocoapods.org/pods/SwiftyNavigationBar)
5 | [](https://cocoapods.org/pods/SwiftyNavigationBar)
6 | [](https://cocoapods.org/pods/SwiftyNavigationBar)
7 |
8 | An easy way to customizing NavigationBar.
9 |
10 | ## Quick Start
11 |
12 | 首先,你需要用以下`extension`中的一个`init`来初始化`UINavigationController`:
13 |
14 | ```swift
15 | // 1
16 | init(preference: ((Style) -> Void)?)
17 |
18 | // 2
19 | init(rootViewController: UIViewController, preference: ((Style) -> Void)?)
20 |
21 | // 3
22 | init(viewControllers: [UIViewController], preference: ((Style) -> Void)?)
23 |
24 | // 4
25 | init(viewControllers: [UIViewController], toolbarClass: AnyClass?, preference: ((Style) -> Void)?)
26 | ```
27 |
28 | ```swift
29 | let nav = UINavigationController(rootViewController: ViewController(), preference: nil)
30 | ```
31 |
32 | > ⚠️注意,以上`init`方法内部接管了`UINavigationController`的`delegate`,请勿再重新设置delegate。如果有需要,可以通过`nav.snb.navigationControllerDelegate`来设置delegate。
33 |
34 | 接下来,你只要需要在`UIViewController`的`viewDidLoad()`或调用更靠前的方法中做一些配置就好,这些配置项都以`snb`为前缀:
35 |
36 | ```swift
37 | override func viewDidLoad() {
38 | super.viewDidLoad()
39 |
40 | self.snb.style.backgroundEffect = .color(.red)
41 | self.snb.style.backgroundAlpha = 0.5
42 | ...
43 | }
44 | ```
45 |
46 | 当你想更新当前`NavigationBar`的样式时,需要调用`snb.updateStyle()`方法:
47 |
48 | ```swift
49 | self.snb.updateStyle { (style) in
50 | style.isWhiteBarStyle = true
51 | style.shadowImageAlpha = 0.5
52 | }
53 | ```
54 |
55 | > ⚠️这里需要注意的是,`snb.updateStyle()`只作用于`UINavigationController.topViewController`,你当前的`ViewController`在栈顶时才会起作用。
56 |
57 | ### Style
58 |
59 | 具体来说有以下样式可配置(PS: 这些GIF当中的样式都是通过`snb.updateStyle()`方法更新的):
60 |
61 | - `backgroundEffect`:改变背景样式,有`Blur`/`Image`/`Color`三类样式可选
62 |
63 | 
64 |
65 | - `backgroundAlpha`:改变背景透明度(并不是改变`NavigationBar`的透明度)
66 |
67 | 
68 |
69 | - `tintColor`:改变`NavigationBar`的`tintColor`,主要影响左右两边`BarButtonItem`的颜色
70 |
71 | 
72 |
73 | - `isWhiteBarStyle`:改变`NavigationBar`的`barStyle`,主要影响`StatusBar`和`title`
74 |
75 | 
76 |
77 | - `shadowImageAlpha`:改变`shadowImage`的透明度
78 |
79 | 
80 |
81 | - `alpha`:改变`NavigationBar`的透明度(这会使得整个`NavigationBar`被隐藏掉)
82 |
83 | 
84 |
85 | ### 样式的综合使用
86 |
87 | - 🌰#1
88 |
89 | 
90 |
91 | - 🌰#2
92 |
93 | 
94 |
95 |
96 |
97 | ### 推荐用法
98 |
99 | 你并不需要在每个`UIViewController`的`viewDidLoad()`方法中都进行一番相关样式的配置。
100 |
101 | 实际上,SwiftyNavigationBar提供了3种样式配置的作用域,选择一个合适的作用域,会使配置更便捷:
102 |
103 | - `UIViewController`作用域:在`ViewController`中,以`snb.style`开头的相关属性配置,它只会影响当前`ViewController`的样式
104 |
105 | ```swift
106 | override func viewDidLoad() {
107 | ...
108 | self.snb.style.backgroundAlpha = /* alpha */
109 | ...
110 | }
111 | ```
112 |
113 | - `UINavigationController`作用域:会作用于`UINavigationController`中的所有`viewControllers`
114 |
115 | ```swift
116 | let nav = UINavigationController(rootViewController: ViewController(), preference: { (style) in
117 | // 样式配置
118 | style.backgroundEffect = /* effect */
119 | ...
120 | })
121 | ```
122 |
123 | - `Global`作用域:会作用于所有通过相关`init`方法初始化的`UINavigationController`。
124 |
125 | ```swift
126 | SwiftyNavigationBar.Style.backgroundEffect = /* effect */
127 | SwiftyNavigationBar.Style.tintColor = /* tintColor */
128 | SwiftyNavigationBar.Style.alpha = /* alpha */
129 | ```
130 |
131 | 他们的优先级是:`UIViewController`作用域 > `UINavigationController`作用域 > `Global`作用域
132 |
133 | 其中`Global`作用域有默认值,也就是说,`UINavigationController`作用域/`UIViewController`作用域可以不用配置或只配置一部分样式,剩下的样式配置使用`Global`作用域的配置即可。
134 |
135 | 所以一个比较推荐的用法如下:
136 |
137 | ```swift
138 | // 第一步,配置Global作用域
139 | SwiftyNavigationBar.Style.backgroundEffect = /* effect */
140 |
141 | // 第二步,配置UINavigationController作用域
142 | let nav1 = UINavigationController(rootViewController: ViewController(), preference: { (style) in
143 | style.backgroundEffect = /* effect */
144 | style.tintColor = /* tintColor */
145 | })
146 |
147 | let nav2 = UINavigationController(rootViewController: ViewController(), preference: nil)
148 | nav2.snb.navigationControllerDelegate = self /* 等价于nav.delegate = self */
149 |
150 | // 第三步,配置UIViewController作用域
151 | override func viewDidLoad() {
152 | ...
153 | self.snb.style.backgroundAlpha = /* alpha */
154 | ...
155 | }
156 | ```
157 |
158 | ## Requirements
159 |
160 | - iOS 8.0+
161 | - Swift 5.0
162 |
163 | ## Installation
164 |
165 | ### CocoaPods
166 |
167 | SwiftyNavigationBar is available through [CocoaPods](https://cocoapods.org). To install it, simply add the following line to your Podfile:
168 |
169 | ```ruby
170 | pod 'SwiftyNavigationBar'
171 | ```
172 |
173 | ### Swift Package Manager
174 |
175 | From Xcode 11, you can use [Swift Package Manager](https://swift.org/package-manager/) to add SwiftyNavigationBar to your project.
176 |
177 | ```swift
178 | dependencies: [
179 | .package(url: "https://github.com/wlgemini/SwiftyNavigationBar.git", .upToNextMajor(from: "5.1.0"))
180 | ]
181 | ```
182 |
183 | ## License
184 |
185 | SwiftyNavigationBar is available under the MIT license. See the LICENSE file for more info.
186 |
--------------------------------------------------------------------------------
/Sources/NavigationBar.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SwiftyNavigationBar
3 | //
4 | // Copyright (c) 2019-Present wlgemini .
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in all
14 | // copies or substantial portions of the Software.
15 |
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | // SOFTWARE.
23 |
24 | import UIKit
25 |
26 |
27 | /// NavigationBar
28 | internal class NavigationBar: UINavigationBar {
29 |
30 | // MARK: - For override system logic
31 | /// tintColor
32 | override var tintColor: UIColor! {
33 | get { return super.tintColor }
34 | set { super.tintColor = self._tintColor }
35 | }
36 |
37 | /// barStyle
38 | override var barStyle: UIBarStyle {
39 | get { return super.barStyle }
40 | set { super.barStyle = self._barStyle }
41 | }
42 |
43 | /// alpha
44 | override var alpha: CGFloat {
45 | get { return super.alpha }
46 | set { super.alpha = self._alpha }
47 | }
48 |
49 | /// layoutSubviews
50 | override func layoutSubviews() {
51 | super.layoutSubviews()
52 |
53 | let w = self.frame.width
54 | let h = self.frame.height
55 | let x = self.frame.origin.x
56 | let y = self.frame.origin.y
57 |
58 | // backgroundFakeBar
59 | self._backgroundFakeBar.frame = CGRect(x: 0, y: -y, width: w, height: h + y)
60 | self.insertSubview(self._backgroundFakeBar, at: 0)
61 |
62 | // shadowImageView
63 | self._shadowImageView.frame = CGRect(x: x, y: h, width: w, height: 1.0 / UIScreen.main.scale)
64 | self.insertSubview(self._shadowImageView, at: 1)
65 | }
66 |
67 | // MARK: - Internal
68 | /// preference style
69 | var preferenceStyle: Style?
70 |
71 | /// isBackgroundFakeBarHidden
72 | var isBackgroundFakeBarHidden: Bool {
73 | get { return self._backgroundFakeBar.isHidden }
74 | set { self._backgroundFakeBar.isHidden = newValue }
75 | }
76 |
77 | /// set style
78 | func setStyle(_ style: Style) {
79 | // preferenceStyle
80 | guard let preferenceStyle = self.preferenceStyle else { return }
81 | // style
82 | self._style = style
83 |
84 | // backgroundFakeBar (without animation)
85 | UIView.performWithoutAnimation {
86 | self._backgroundFakeBar.setStyle(style, preferenceStyle: preferenceStyle)
87 | }
88 |
89 | // tintColor
90 | self._tintColor = style._tintColor ?? preferenceStyle._tintColor ?? Style.tintColor
91 |
92 | // isWhiteBarStyle
93 | let isWhiteBarStyle = style._isWhiteBarStyle ?? preferenceStyle._isWhiteBarStyle ?? Style.isWhiteBarStyle
94 | if isWhiteBarStyle {
95 | self._barStyle = .black
96 | } else {
97 | self._barStyle = .default
98 | }
99 |
100 | // shadowImageAlpha
101 | self._shadowImageView.alpha = style._shadowImageAlpha ?? preferenceStyle._shadowImageAlpha ?? Style.shadowImageAlpha
102 |
103 | // alpha
104 | self._alpha = style._alpha ?? preferenceStyle._alpha ?? Style.alpha
105 | }
106 |
107 | /// update to style
108 | func update(fromStyle: Style, toStyle: Style) {
109 | // style
110 | guard let style = self._style else { return }
111 | // preferenceStyle
112 | guard let preferenceStyle = self.preferenceStyle else { return }
113 | // there must be the same reference, else something wrong happened.
114 | guard style === fromStyle else { return }
115 |
116 | // backgroundFakeBar
117 | self._backgroundFakeBar.updateStyle(style, toStyle: toStyle, preferenceStyle: preferenceStyle)
118 |
119 | // tintColor
120 | if let toTintColor = toStyle._tintColor {
121 | let tintColor = style._tintColor ?? preferenceStyle._tintColor ?? Style.tintColor
122 | if tintColor != toTintColor {
123 | style._tintColor = toTintColor
124 | self._tintColor = toTintColor
125 | }
126 | }
127 |
128 | // isWhiteBarStyle
129 | if let toIsWhiteBarStyle = toStyle._isWhiteBarStyle {
130 | let isWhiteBarStyle = style._isWhiteBarStyle ?? preferenceStyle._isWhiteBarStyle ?? Style.isWhiteBarStyle
131 | if isWhiteBarStyle != toIsWhiteBarStyle {
132 | style._isWhiteBarStyle = toIsWhiteBarStyle
133 | if toIsWhiteBarStyle {
134 | self._barStyle = .black
135 | } else {
136 | self._barStyle = .default
137 | }
138 | }
139 | }
140 |
141 | // shadowImageAlpha
142 | if let toShadowImageAlpha = toStyle._shadowImageAlpha {
143 | let shadowImageAlpha = style._shadowImageAlpha ?? preferenceStyle._shadowImageAlpha ?? Style.shadowImageAlpha
144 | if shadowImageAlpha != toShadowImageAlpha {
145 | style._shadowImageAlpha = toShadowImageAlpha
146 | self._shadowImageView.alpha = toShadowImageAlpha
147 | }
148 | }
149 |
150 | // alpha
151 | if let toAlpha = toStyle._alpha {
152 | let alpha = style._alpha ?? preferenceStyle._alpha ?? Style.alpha
153 | if alpha != toAlpha {
154 | style._alpha = toAlpha
155 | self._alpha = toAlpha
156 | }
157 | }
158 | }
159 |
160 | /// add fromfakeBar to fromVC
161 | func addFromFakeBar(to fromVC: UIViewController) {
162 | self.addFakeBar(fakeBar: self._fromFakeBar, to: fromVC)
163 | }
164 |
165 | /// add tofakeBar to toVC
166 | func addToFakeBar(to toVC: UIViewController) {
167 | self.addFakeBar(fakeBar: self._toFakeBar, to: toVC)
168 | }
169 |
170 | /// remove fromFakeBar and toFakeBar from superview
171 | func removeToAndFromFakeBar() {
172 | self._fromFakeBar.removeFromSuperview()
173 | self._toFakeBar.removeFromSuperview()
174 | }
175 |
176 | /// is same style for transition
177 | static func isSameStyle(lhs: Style, rhs: Style, preferenceStyle: Style) -> Bool {
178 | // alpha
179 | let alphaL = lhs._alpha ?? preferenceStyle._alpha ?? Style.alpha
180 | let alphaR = rhs._alpha ?? preferenceStyle._alpha ?? Style.alpha
181 |
182 | // check is same Style
183 | if alphaL == alphaR && _FakeBar.isSameStyle(lhs: lhs, rhs: rhs, preferenceStyle: preferenceStyle) {
184 | return true
185 | } else {
186 | return false
187 | }
188 | }
189 |
190 | // MARK: - Private
191 | /// for override tintColor logic
192 | private var _tintColor: UIColor = Style.tintColor {
193 | didSet { self.tintColor = self._tintColor }
194 | }
195 |
196 | /// for override barStyle logic
197 | private var _barStyle: UIBarStyle = Style.isWhiteBarStyle ? .black : .default {
198 | didSet { self.barStyle = self._barStyle }
199 | }
200 |
201 | /// for override alpha logic
202 | private var _alpha: CGFloat = Style.alpha {
203 | didSet { self.alpha = self._alpha }
204 | }
205 |
206 | /// style
207 | private var _style: Style?
208 |
209 | /// backgroundFakeBar
210 | private let _backgroundFakeBar = _FakeBar()
211 |
212 | /// shadowImageView
213 | private let _shadowImageView = _ShadowImageView()
214 |
215 | /// fromFakeBar
216 | private let _fromFakeBar = _FakeBar()
217 |
218 | /// toFakeBar
219 | private let _toFakeBar = _FakeBar()
220 |
221 | /// add fakeBar to viewController
222 | private func addFakeBar(fakeBar: _FakeBar, to vc: UIViewController) {
223 | guard let preferenceStyle = self.preferenceStyle else { return }
224 |
225 | // set fakeBar style & frame without animation
226 | UIView.performWithoutAnimation {
227 | // set style
228 | fakeBar.setStyle(vc.snb.style, preferenceStyle: preferenceStyle)
229 |
230 | // set alpha according to alpha & backgroundAlpha
231 | let alpha = vc.snb.style._alpha ?? preferenceStyle._alpha ?? Style.alpha
232 | let backgroundAlpha = vc.snb.style._backgroundAlpha ?? preferenceStyle._backgroundAlpha ?? Style.backgroundAlpha
233 | fakeBar.alpha = alpha * backgroundAlpha
234 |
235 | // set frame
236 | fakeBar.frame = CGRect(origin: vc.view.bounds.origin, size: self._backgroundFakeBar.bounds.size)
237 |
238 | // add subview
239 | vc.view.addSubview(fakeBar)
240 | }
241 | }
242 | }
243 |
244 |
245 | /// _FakeBar
246 | fileprivate class _FakeBar: UIView {
247 |
248 | // MARK: - For override system logic
249 | /// init
250 | convenience init() {
251 | self.init(frame: .zero)
252 |
253 | // _blurView
254 | self._blurView = UIVisualEffectView()
255 | self.addSubview(self._blurView)
256 |
257 | // _imageView
258 | self._imageView = UIImageView()
259 | self._imageView.clipsToBounds = true
260 | self.addSubview(self._imageView)
261 |
262 | // _colorView
263 | self._colorView = UIView()
264 | self.addSubview(self._colorView)
265 | }
266 |
267 | /// layoutSubviews
268 | override func layoutSubviews() {
269 | super.layoutSubviews()
270 |
271 | self._blurView.frame = self.bounds
272 | self._imageView.frame = self.bounds
273 | self._colorView.frame = self.bounds
274 | }
275 |
276 | // MARK: - Fileprivate
277 | /// set style
278 | func setStyle(_ style: Style, preferenceStyle: Style) {
279 | // backgroundEffect
280 | let backgroundEffect = style._backgroundEffect ?? preferenceStyle._backgroundEffect ?? Style.backgroundEffect
281 | self._blurView.isHidden = true
282 | self._imageView.isHidden = true
283 | self._colorView.isHidden = true
284 | switch backgroundEffect {
285 | case .blur(let b):
286 | self._blurView.effect = UIBlurEffect(style: b)
287 | self._blurView.isHidden = false
288 |
289 | case .image(let i, let c):
290 | self._imageView.image = i
291 | self._imageView.contentMode = c
292 | self._imageView.isHidden = false
293 |
294 | case .color(let c):
295 | self._colorView.backgroundColor = c
296 | self._colorView.isHidden = false
297 | }
298 |
299 | // backgroundAlpha
300 | self.alpha = style._backgroundAlpha ?? preferenceStyle._backgroundAlpha ?? Style.backgroundAlpha
301 | }
302 |
303 | /// update to style
304 | func updateStyle(_ style: Style, toStyle: Style, preferenceStyle: Style) {
305 | // backgroundEffect
306 | if let toBackgroundEffect = toStyle._backgroundEffect {
307 | let backgroundEffect = style._backgroundEffect ?? preferenceStyle._backgroundEffect ?? Style.backgroundEffect
308 | if backgroundEffect != toBackgroundEffect {
309 | style._backgroundEffect = toBackgroundEffect
310 | self._blurView.isHidden = true
311 | self._imageView.isHidden = true
312 | self._colorView.isHidden = true
313 | switch toBackgroundEffect {
314 | case .blur(let b):
315 | self._blurView.effect = UIBlurEffect(style: b)
316 | self._blurView.isHidden = false
317 |
318 | case .image(let i, let c):
319 | self._imageView.image = i
320 | self._imageView.contentMode = c
321 | self._imageView.isHidden = false
322 |
323 | case .color(let c):
324 | self._colorView.backgroundColor = c
325 | self._colorView.isHidden = false
326 | }
327 | }
328 | }
329 |
330 | // backgroundAlpha
331 | if let toBackgroundAlpha = toStyle._backgroundAlpha {
332 | let backgroundAlpha = style._backgroundAlpha ?? preferenceStyle._backgroundAlpha ?? Style.backgroundAlpha
333 | if backgroundAlpha != toBackgroundAlpha {
334 | style._backgroundAlpha = toBackgroundAlpha
335 | self.alpha = toBackgroundAlpha
336 | }
337 | }
338 | }
339 |
340 | /// is same style for fakeBar
341 | static func isSameStyle(lhs: Style, rhs: Style, preferenceStyle: Style) -> Bool {
342 | // backgroundEffect
343 | let backgroundEffectL = lhs._backgroundEffect ?? preferenceStyle._backgroundEffect ?? Style.backgroundEffect
344 | let backgroundEffectR = rhs._backgroundEffect ?? preferenceStyle._backgroundEffect ?? Style.backgroundEffect
345 |
346 | // backgroundAlpha
347 | let backgroundAlphaL = lhs._backgroundAlpha ?? preferenceStyle._backgroundAlpha ?? Style.backgroundAlpha
348 | let backgroundAlphaR = rhs._backgroundAlpha ?? preferenceStyle._backgroundAlpha ?? Style.backgroundAlpha
349 |
350 | // check is same Style
351 | if backgroundEffectL == backgroundEffectR && backgroundAlphaL == backgroundAlphaR {
352 | return true
353 | } else {
354 | return false
355 | }
356 | }
357 |
358 | // MARK: - Private
359 | private var _blurView: UIVisualEffectView!
360 | private var _imageView: UIImageView!
361 | private var _colorView: UIView!
362 | }
363 |
364 |
365 | /// _ShadowImageView
366 | fileprivate class _ShadowImageView: UIImageView {
367 |
368 | /// init
369 | convenience init() {
370 | self.init(frame: .zero)
371 | self.backgroundColor = .black
372 | }
373 | }
374 |
--------------------------------------------------------------------------------
/Sources/Proxy.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SwiftyNavigationBar
3 | //
4 | // Copyright (c) 2019-Present wlgemini .
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in all
14 | // copies or substantial portions of the Software.
15 |
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | // SOFTWARE.
23 |
24 | import UIKit
25 |
26 |
27 | /// Proxy
28 | internal class Proxy: NSObject {
29 |
30 | /// navigationController delegate
31 | weak var navigationControllerDelegate: UINavigationControllerDelegate?
32 |
33 | /// navigationBar
34 | var navigationBar: NavigationBar { return self._navigationController.navigationBar as! NavigationBar }
35 |
36 | /// init
37 | init(_ navigationController: UINavigationController, preferenceStyle: Style) {
38 | // navigationController
39 | self._navigationController = navigationController
40 |
41 | // super init
42 | super.init()
43 |
44 | // config navigationBar
45 | self.navigationBar.preferenceStyle = preferenceStyle
46 | self.navigationBar.setBackgroundImage(UIImage(), for: .default)
47 | self.navigationBar.shadowImage = UIImage()
48 | }
49 |
50 | // MARK: - Private
51 | /// navigationController
52 | private unowned(safe) let _navigationController: UINavigationController
53 | }
54 |
55 |
56 | /// Proxy (UINavigationControllerDelegate)
57 | extension Proxy: UINavigationControllerDelegate {
58 |
59 | // MARK: - Forwarding message call to UINavigationController.delegate if self (Proxy) don't respond
60 | override func responds(to aSelector: Selector!) -> Bool {
61 | if #selector(Proxy.navigationController(_:willShow:animated:)) == aSelector {
62 | return true
63 | } else {
64 | return self.navigationControllerDelegate?.responds(to: aSelector) ?? false
65 | }
66 | }
67 |
68 | override func forwardingTarget(for aSelector: Selector!) -> Any? {
69 | return self.navigationControllerDelegate
70 | }
71 |
72 | // MARK: - UINavigationControllerDelegate
73 | @objc func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) {
74 | if let preferenceStyle = self.navigationBar.preferenceStyle {
75 | let navBar = self.navigationBar
76 | let transitionCoordinator = self._navigationController.transitionCoordinator
77 |
78 | if let coordinator = transitionCoordinator { // transition with animation
79 | coordinator.animate(alongsideTransition: { (ctx) in
80 | guard let fromVC = ctx.viewController(forKey: .from), let toVC = ctx.viewController(forKey: .to) else { return }
81 |
82 | // set fake bar style without animation, if there are not same style for transition.
83 | if NavigationBar.isSameStyle(lhs: fromVC.snb.style, rhs: toVC.snb.style, preferenceStyle: preferenceStyle) == false {
84 | // add fromFakeBar to fromVC
85 | navBar.addFromFakeBar(to: fromVC)
86 |
87 | // add toFakeBar to toVC
88 | navBar.addToFakeBar(to: toVC)
89 |
90 | // hidden backgroundFakeBar
91 | navBar.isBackgroundFakeBarHidden = true
92 | }
93 |
94 | // set navigationBar style with animation
95 | navBar.setStyle(toVC.snb.style)
96 |
97 | }) { (ctx) in
98 | guard let fromVC = ctx.viewController(forKey: .from) else { return }
99 |
100 | // remove fromFakeBar and toFakeBar from superview
101 | navBar.removeToAndFromFakeBar()
102 |
103 | // rollback navigationBar and backgroundFakeBar style if transition is cancelled
104 | if ctx.isCancelled {
105 | navBar.setStyle(fromVC.snb.style)
106 | }
107 |
108 | // show backgroundFakeBar
109 | navBar.isBackgroundFakeBarHidden = false
110 | }
111 | } else { // transition without animation
112 | // set navigationBar and backgroundFakeBar style
113 | let toVC = viewController
114 | navBar.setStyle(toVC.snb.style)
115 | }
116 | }
117 |
118 | /// call navigationController delegate
119 | self.navigationControllerDelegate?.navigationController?(navigationController, willShow: viewController, animated: animated)
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/Sources/Style.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SwiftyNavigationBar
3 | //
4 | // Copyright (c) 2019-Present wlgemini .
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in all
14 | // copies or substantial portions of the Software.
15 |
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | // SOFTWARE.
23 |
24 | import UIKit
25 |
26 |
27 | /// Style
28 | public class Style {
29 |
30 | /// set navigationBar.backgroundView's backgroundEffect, default: .blur(.light)
31 | public var backgroundEffect: Style.Effect? {
32 | get { return self._backgroundEffect }
33 | set { self._backgroundEffect = newValue }
34 | }
35 |
36 | /// set navigationBar.backgroundView's backgroundAlpha, default: 1
37 | public var backgroundAlpha: CGFloat? {
38 | get { return self._backgroundAlpha }
39 | set {
40 | if let nv = newValue {
41 | if nv > 1 {
42 | self._backgroundAlpha = 1
43 | } else if nv < 0 {
44 | self._backgroundAlpha = 0
45 | } else {
46 | self._backgroundAlpha = nv
47 | }
48 | } else {
49 | self._backgroundAlpha = nil
50 | }
51 | }
52 | }
53 |
54 | /// set navigationBar's tintColor, default: black
55 | public var tintColor: UIColor? {
56 | get { return self._tintColor }
57 | set { self._tintColor = newValue }
58 | }
59 |
60 | /// set navigationBar's isWhiteBarStyle, default: false
61 | public var isWhiteBarStyle: Bool? {
62 | get { return self._isWhiteBarStyle }
63 | set { self._isWhiteBarStyle = newValue }
64 | }
65 |
66 | /// set navigationBar's shadowImageAlpha, default: 0.5
67 | public var shadowImageAlpha: CGFloat? {
68 | get { return self._shadowImageAlpha }
69 | set {
70 | if let nv = newValue {
71 | if nv > 1 {
72 | self._shadowImageAlpha = nv
73 | } else if nv < 0 {
74 | self._shadowImageAlpha = 0
75 | } else {
76 | self._shadowImageAlpha = nv
77 | }
78 | } else {
79 | self._shadowImageAlpha = nil
80 | }
81 | }
82 | }
83 |
84 | /// set navigationBar's alpha, default: 1
85 | public var alpha: CGFloat? {
86 | get { return self._alpha }
87 | set {
88 | if let nv = newValue {
89 | if nv > 1 {
90 | self._alpha = 1
91 | } else if nv < 0 {
92 | self._alpha = 0
93 | } else {
94 | self._alpha = nv
95 | }
96 | } else {
97 | self._alpha = nil
98 | }
99 | }
100 | }
101 |
102 | // MARK: - Internal
103 | /// Style property's backstore
104 | var _backgroundEffect: Style.Effect?
105 | var _backgroundAlpha: CGFloat?
106 | var _tintColor: UIColor?
107 | var _isWhiteBarStyle: Bool?
108 | var _shadowImageAlpha: CGFloat?
109 | var _alpha: CGFloat?
110 |
111 | /// init
112 | internal init() {}
113 | }
114 |
115 |
116 | /// Style(Default)
117 | extension Style {
118 |
119 | /// set navigationBar.backgroundView's backgroundEffect, default: .blur(.light)
120 | public static var backgroundEffect: Style.Effect = .blur(.light)
121 |
122 | /// set navigationBar.backgroundView's backgroundAlpha, default: 1
123 | public static var backgroundAlpha: CGFloat = 1
124 |
125 | /// set navigationBar's tintColor, default: black
126 | public static var tintColor: UIColor = .black
127 |
128 | /// set navigationBar's isWhiteBarStyle, default: false
129 | public static var isWhiteBarStyle: Bool = false
130 |
131 | /// set navigationBar's shadowImageAlpha, default: 0.5
132 | public static var shadowImageAlpha: CGFloat = 0.5
133 |
134 | /// set navigationBar's alpha, default: 1
135 | public static var alpha: CGFloat = 1
136 | }
137 |
138 |
139 | /// Style (Effect)
140 | extension Style {
141 |
142 | /// Effect
143 | public enum Effect: Equatable {
144 |
145 | /// blur effect
146 | case blur(UIBlurEffect.Style)
147 |
148 | /// image
149 | case image(UIImage, UIView.ContentMode)
150 |
151 | /// color
152 | case color(UIColor)
153 |
154 | /// ==
155 | public static func == (lhs: Effect, rhs: Effect) -> Bool {
156 | if case .blur(let styleL) = lhs, case .blur(let styleR) = rhs {
157 | return styleL == styleR
158 | }
159 | else if case .image(let imageL, let modeL) = lhs, case .image(let imageR, let modeR) = rhs {
160 | return imageL.pngData() == imageR.pngData() && modeL == modeR
161 | }
162 | else if case .color(let colorL) = lhs, case .color(let colorR) = rhs {
163 | return colorL == colorR
164 | }
165 | else {
166 | return false
167 | }
168 | }
169 | }
170 | }
171 |
--------------------------------------------------------------------------------
/Sources/SwiftyNavigationBar.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SwiftyNavigationBar
3 | //
4 | // Copyright (c) 2019-Present wlgemini .
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in all
14 | // copies or substantial portions of the Software.
15 |
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | // SOFTWARE.
23 |
24 | import UIKit
25 |
26 |
27 | /// Proxy
28 | public class SwiftyNavigationBar {
29 |
30 | /// current view controller's navigation bar style
31 | public let style: Style = Style()
32 |
33 | /// use this as UINavigationController.delegate
34 | public weak var navigationControllerDelegate: UINavigationControllerDelegate? {
35 | get {
36 | return self._navigationController?.proxy?.navigationControllerDelegate ?? self._navigationController?.delegate
37 | }
38 | set {
39 | if let proxy = self._navigationController?.proxy {
40 | // bugfix: reset navigationController.delegate
41 | self._navigationController?.delegate = nil
42 | proxy.navigationControllerDelegate = newValue
43 | self._navigationController?.delegate = proxy
44 | } else {
45 | self._navigationController?.delegate = newValue
46 | }
47 | }
48 | }
49 |
50 | /// update style instantly
51 | public func updateStyle(_ setting: (Style) -> Void) {
52 | guard let navBar = self._navigationController?.proxy?.navigationBar else { return }
53 |
54 | let toStyle = Style()
55 | setting(toStyle)
56 | navBar.update(fromStyle: self.style, toStyle: toStyle)
57 | }
58 |
59 | /// init
60 | internal init(viewController: UIViewController) {
61 | self._viewController = viewController
62 | }
63 |
64 | // MARK: - Private
65 | /// _viewController
66 | private unowned(safe) var _viewController: UIViewController
67 | /// _navigationController
68 | private var _navigationController: UINavigationController? {
69 | if let nav = self._viewController as? UINavigationController {
70 | return nav
71 | } else {
72 | return self._viewController.navigationController
73 | }
74 | }
75 | }
76 |
--------------------------------------------------------------------------------
/Sources/UINavigationController+SwiftyNavigationBar.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SwiftyNavigationBar
3 | //
4 | // Copyright (c) 2019-Present wlgemini .
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in all
14 | // copies or substantial portions of the Software.
15 |
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | // SOFTWARE.
23 |
24 | import UIKit
25 |
26 |
27 | /// UINavigationController(Init)
28 | public extension UINavigationController {
29 |
30 | /// init with preference style
31 | convenience init(preference: ((Style) -> Void)?) {
32 | self.init(viewControllers: [], toolbarClass: nil, preference: preference)
33 | }
34 |
35 | /// init with rootViewController and preference style
36 | convenience init(rootViewController: UIViewController, preference: ((Style) -> Void)?) {
37 | self.init(viewControllers: [rootViewController], toolbarClass: nil, preference: preference)
38 | }
39 |
40 | /// init with viewControllers and preference style
41 | convenience init(viewControllers: [UIViewController], preference: ((Style) -> Void)?) {
42 | self.init(viewControllers: viewControllers, toolbarClass: nil, preference: preference)
43 | }
44 |
45 | /// init with viewControllers, toolbarClass and preference style
46 | convenience init(viewControllers: [UIViewController], toolbarClass: AnyClass?, preference: ((Style) -> Void)?) {
47 | // init
48 | self.init(navigationBarClass: NavigationBar.self, toolbarClass: toolbarClass)
49 |
50 | // config
51 | self.viewControllers = viewControllers
52 | let preferenceStyle = Style()
53 | preference?(preferenceStyle)
54 | let proxy = Proxy(self, preferenceStyle: preferenceStyle)
55 | self.proxy = proxy
56 |
57 | // set delegate
58 | self.delegate = proxy
59 | }
60 |
61 | /// proxy
62 | internal var proxy: Proxy? {
63 | get { return objc_getAssociatedObject(self, &UINavigationController._proxyKey) as? Proxy }
64 | set { objc_setAssociatedObject(self, &UINavigationController._proxyKey, newValue, .OBJC_ASSOCIATION_RETAIN_NONATOMIC) }
65 | }
66 |
67 | // MARK: - Private
68 | /// proxy key
69 | private static var _proxyKey: Void?
70 | }
71 |
--------------------------------------------------------------------------------
/Sources/UIViewController+SwiftyNavigationBar.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SwiftyNavigationBar
3 | //
4 | // Copyright (c) 2019-Present wlgemini .
5 | //
6 | // Permission is hereby granted, free of charge, to any person obtaining a copy
7 | // of this software and associated documentation files (the "Software"), to deal
8 | // in the Software without restriction, including without limitation the rights
9 | // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | // copies of the Software, and to permit persons to whom the Software is
11 | // furnished to do so, subject to the following conditions:
12 | //
13 | // The above copyright notice and this permission notice shall be included in all
14 | // copies or substantial portions of the Software.
15 |
16 | // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | // SOFTWARE.
23 |
24 | import UIKit
25 |
26 |
27 | /// UIViewController(SwiftyNavigationBar)
28 | extension UIViewController {
29 |
30 | /// snb
31 | public var snb: SwiftyNavigationBar {
32 | if let snb = objc_getAssociatedObject(self, &UIViewController._snbKey) as? SwiftyNavigationBar {
33 | return snb
34 | } else {
35 | let snb = SwiftyNavigationBar(viewController: self)
36 | objc_setAssociatedObject(self, &UIViewController._snbKey, snb, .OBJC_ASSOCIATION_RETAIN_NONATOMIC)
37 | return snb
38 | }
39 | }
40 |
41 | /// _snbKey
42 | private static var _snbKey: Void?
43 | }
44 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = 'SwiftyNavigationBar'
3 | s.version = '5.1.2'
4 | s.summary = 'An easy way to customizing NavigationBar.'
5 | s.homepage = 'https://github.com/wlgemini/SwiftyNavigationBar'
6 | s.license = { :type => 'MIT', :file => 'LICENSE' }
7 | s.author = { 'wlgemini' => 'wangluguang@live.com' }
8 | s.source = { :git => 'https://github.com/wlgemini/SwiftyNavigationBar.git', :tag => s.version.to_s }
9 | s.ios.deployment_target = '8.0'
10 | s.source_files = 'Sources/*.swift'
11 | s.swift_version = '5.0'
12 | s.frameworks = 'UIKit'
13 | end
14 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/Podfile:
--------------------------------------------------------------------------------
1 | # Uncomment the next line to define a global platform for your project
2 | platform :ios, '10.0'
3 |
4 | target 'SwiftyNavigationBar_Demo' do
5 | pod 'SwiftyNavigationBar', :path => '../'
6 |
7 | end
8 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - SwiftyNavigationBar (5.1.2)
3 |
4 | DEPENDENCIES:
5 | - SwiftyNavigationBar (from `../`)
6 |
7 | EXTERNAL SOURCES:
8 | SwiftyNavigationBar:
9 | :path: "../"
10 |
11 | SPEC CHECKSUMS:
12 | SwiftyNavigationBar: 121441eaa5bd4ce8378dca3401f89b2af850d191
13 |
14 | PODFILE CHECKSUM: 484669623df81a9559e2aef142f1e16eac77e2fa
15 |
16 | COCOAPODS: 1.9.1
17 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/Pods/Headers/Public/SwiftyNavigationBar/SwiftyNavigationBar-umbrella.h:
--------------------------------------------------------------------------------
1 | ../../../Target Support Files/SwiftyNavigationBar/SwiftyNavigationBar-umbrella.h
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/Pods/Headers/Public/SwiftyNavigationBar/SwiftyNavigationBar.modulemap:
--------------------------------------------------------------------------------
1 | ../../../Target Support Files/SwiftyNavigationBar/SwiftyNavigationBar.modulemap
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/Pods/Local Podspecs/SwiftyNavigationBar.podspec.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "SwiftyNavigationBar",
3 | "version": "5.1.2",
4 | "summary": "An easy way to customizing NavigationBar.",
5 | "homepage": "https://github.com/wlgemini/SwiftyNavigationBar",
6 | "license": {
7 | "type": "MIT",
8 | "file": "LICENSE"
9 | },
10 | "authors": {
11 | "wlgemini": "wangluguang@live.com"
12 | },
13 | "source": {
14 | "git": "https://github.com/wlgemini/SwiftyNavigationBar.git",
15 | "tag": "5.1.2"
16 | },
17 | "platforms": {
18 | "ios": "8.0"
19 | },
20 | "source_files": "Sources/*.swift",
21 | "swift_versions": "5.0",
22 | "frameworks": "UIKit",
23 | "swift_version": "5.0"
24 | }
25 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - SwiftyNavigationBar (5.1.2)
3 |
4 | DEPENDENCIES:
5 | - SwiftyNavigationBar (from `../`)
6 |
7 | EXTERNAL SOURCES:
8 | SwiftyNavigationBar:
9 | :path: "../"
10 |
11 | SPEC CHECKSUMS:
12 | SwiftyNavigationBar: 121441eaa5bd4ce8378dca3401f89b2af850d191
13 |
14 | PODFILE CHECKSUM: 484669623df81a9559e2aef142f1e16eac77e2fa
15 |
16 | COCOAPODS: 1.9.1
17 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/Pods/Pods.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 49011BB9ADA4DF77C6B045C03B074BE3 /* NavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA5E2A143E3F852737C445D969004DDE /* NavigationBar.swift */; };
11 | 8CB920BCFCB55990875B3ED1534153BC /* SwiftyNavigationBar-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 18C5B068FB087E0F3D595B8D4E3FF605 /* SwiftyNavigationBar-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; };
12 | 90ABDD6B6ADD5EE897B298DB5D066A37 /* SwiftyNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBC2C22A6BBDB13EA951A4BE6A682FA7 /* SwiftyNavigationBar.swift */; };
13 | A3B834A79F7313392592DA4D6B0263DD /* Proxy.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C36283C59D7CAB258C97F9200DDAD47 /* Proxy.swift */; };
14 | A915187467677E5CA3658E72DCEB9DED /* Pods-SwiftyNavigationBar_Demo-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 04EE89FB4108CF412D09F9EAC4282154 /* Pods-SwiftyNavigationBar_Demo-dummy.m */; };
15 | B7E7202CD42D21F62A1645024F633A80 /* Style.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4046C5B43329BDA7FCE1502E0ADB040D /* Style.swift */; };
16 | C0FE70E93886E3B696BA1B0D0C49FF5B /* SwiftyNavigationBar-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F14F59548239EB7779CC5EE243FDF48D /* SwiftyNavigationBar-dummy.m */; };
17 | C951C749D6F1E920E6BB050B0A997427 /* UIViewController+SwiftyNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6603DC8C8651D8BBA0BA6C25EBB535BB /* UIViewController+SwiftyNavigationBar.swift */; };
18 | DB3656090D8F0751339E451EA2308D14 /* UINavigationController+SwiftyNavigationBar.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30C47F118C0454011C82D09356C78DF2 /* UINavigationController+SwiftyNavigationBar.swift */; };
19 | E81CA90BBDF17046EC40DE58A07FF1C6 /* Pods-SwiftyNavigationBar_Demo-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 4DE2C6A28D35079DB0133C1ED63D924E /* Pods-SwiftyNavigationBar_Demo-umbrella.h */; settings = {ATTRIBUTES = (Project, ); }; };
20 | /* End PBXBuildFile section */
21 |
22 | /* Begin PBXContainerItemProxy section */
23 | 164F302EA6303BDA09300B3C82BB5E82 /* PBXContainerItemProxy */ = {
24 | isa = PBXContainerItemProxy;
25 | containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */;
26 | proxyType = 1;
27 | remoteGlobalIDString = 28BF9E8D2D5B3453A7307626485B35B3;
28 | remoteInfo = SwiftyNavigationBar;
29 | };
30 | /* End PBXContainerItemProxy section */
31 |
32 | /* Begin PBXFileReference section */
33 | 04EE89FB4108CF412D09F9EAC4282154 /* Pods-SwiftyNavigationBar_Demo-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-SwiftyNavigationBar_Demo-dummy.m"; sourceTree = ""; };
34 | 098B267E35182BC19A909BCB0441C1BF /* libSwiftyNavigationBar.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = libSwiftyNavigationBar.a; path = libSwiftyNavigationBar.a; sourceTree = BUILT_PRODUCTS_DIR; };
35 | 0C36283C59D7CAB258C97F9200DDAD47 /* Proxy.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Proxy.swift; path = Sources/Proxy.swift; sourceTree = ""; };
36 | 18C5B068FB087E0F3D595B8D4E3FF605 /* SwiftyNavigationBar-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftyNavigationBar-umbrella.h"; sourceTree = ""; };
37 | 19BAD898F3E48D1ADA3733E111679CE7 /* Pods-SwiftyNavigationBar_Demo.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-SwiftyNavigationBar_Demo.modulemap"; sourceTree = ""; };
38 | 1ED999FBF227FC5A32D73A9A02D2E0DC /* SwiftyNavigationBar.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftyNavigationBar.debug.xcconfig; sourceTree = ""; };
39 | 30C47F118C0454011C82D09356C78DF2 /* UINavigationController+SwiftyNavigationBar.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UINavigationController+SwiftyNavigationBar.swift"; path = "Sources/UINavigationController+SwiftyNavigationBar.swift"; sourceTree = ""; };
40 | 4046C5B43329BDA7FCE1502E0ADB040D /* Style.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Style.swift; path = Sources/Style.swift; sourceTree = ""; };
41 | 4456FAC8A9968F4715D9916051211B2D /* libPods-SwiftyNavigationBar_Demo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; name = "libPods-SwiftyNavigationBar_Demo.a"; path = "libPods-SwiftyNavigationBar_Demo.a"; sourceTree = BUILT_PRODUCTS_DIR; };
42 | 4DE2C6A28D35079DB0133C1ED63D924E /* Pods-SwiftyNavigationBar_Demo-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-SwiftyNavigationBar_Demo-umbrella.h"; sourceTree = ""; };
43 | 55CEA9EA72343FBA95732E034DBC36E7 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; path = README.md; sourceTree = ""; };
44 | 56145050B08DD295484A34C98D3BB18A /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; path = LICENSE; sourceTree = ""; };
45 | 5F840309D86C1500C7F126084D183E7E /* Pods-SwiftyNavigationBar_Demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftyNavigationBar_Demo.release.xcconfig"; sourceTree = ""; };
46 | 65BC703C31CB26880A489836587CD8E7 /* Pods-SwiftyNavigationBar_Demo-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-SwiftyNavigationBar_Demo-acknowledgements.plist"; sourceTree = ""; };
47 | 6603DC8C8651D8BBA0BA6C25EBB535BB /* UIViewController+SwiftyNavigationBar.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "UIViewController+SwiftyNavigationBar.swift"; path = "Sources/UIViewController+SwiftyNavigationBar.swift"; sourceTree = ""; };
48 | 99D479D9EA7AD0473B50CD8966D8672C /* SwiftyNavigationBar.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = SwiftyNavigationBar.release.xcconfig; sourceTree = ""; };
49 | 9ADFBC0142977C0D4639149216BB6458 /* SwiftyNavigationBar.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = SwiftyNavigationBar.modulemap; sourceTree = ""; };
50 | 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
51 | A52243F642504AFD30AFBED0A4C774F1 /* Pods-SwiftyNavigationBar_Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-SwiftyNavigationBar_Demo.debug.xcconfig"; sourceTree = ""; };
52 | AB5F7C71B9B0D7B31A09F48074918DD3 /* SwiftyNavigationBar-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "SwiftyNavigationBar-prefix.pch"; sourceTree = ""; };
53 | BBC2C22A6BBDB13EA951A4BE6A682FA7 /* SwiftyNavigationBar.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SwiftyNavigationBar.swift; path = Sources/SwiftyNavigationBar.swift; sourceTree = ""; };
54 | DA40B154DF4A8D8996E592F11311CF2A /* Pods-SwiftyNavigationBar_Demo-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-SwiftyNavigationBar_Demo-acknowledgements.markdown"; sourceTree = ""; };
55 | F14F59548239EB7779CC5EE243FDF48D /* SwiftyNavigationBar-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "SwiftyNavigationBar-dummy.m"; sourceTree = ""; };
56 | F259C53ED477ABA698074DBEE9FFF79E /* SwiftyNavigationBar.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; path = SwiftyNavigationBar.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; };
57 | FA5E2A143E3F852737C445D969004DDE /* NavigationBar.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NavigationBar.swift; path = Sources/NavigationBar.swift; sourceTree = ""; };
58 | /* End PBXFileReference section */
59 |
60 | /* Begin PBXFrameworksBuildPhase section */
61 | 7A92C96E44D94C5BBE010101F45BD4F3 /* Frameworks */ = {
62 | isa = PBXFrameworksBuildPhase;
63 | buildActionMask = 2147483647;
64 | files = (
65 | );
66 | runOnlyForDeploymentPostprocessing = 0;
67 | };
68 | F25689E934F875EBAFA58487CF763BBD /* Frameworks */ = {
69 | isa = PBXFrameworksBuildPhase;
70 | buildActionMask = 2147483647;
71 | files = (
72 | );
73 | runOnlyForDeploymentPostprocessing = 0;
74 | };
75 | /* End PBXFrameworksBuildPhase section */
76 |
77 | /* Begin PBXGroup section */
78 | 00529037EBC758502A38A5694AE155D5 /* Targets Support Files */ = {
79 | isa = PBXGroup;
80 | children = (
81 | DFD4BA4F64002FA7F47E70C42A8E9C91 /* Pods-SwiftyNavigationBar_Demo */,
82 | );
83 | name = "Targets Support Files";
84 | sourceTree = "";
85 | };
86 | 033441E3A55D4136D14FD3970ABEB85A /* Products */ = {
87 | isa = PBXGroup;
88 | children = (
89 | 4456FAC8A9968F4715D9916051211B2D /* libPods-SwiftyNavigationBar_Demo.a */,
90 | 098B267E35182BC19A909BCB0441C1BF /* libSwiftyNavigationBar.a */,
91 | );
92 | name = Products;
93 | sourceTree = "";
94 | };
95 | 3D008D27E9B2EBB0CFFFC7F1A7A33E39 /* Pod */ = {
96 | isa = PBXGroup;
97 | children = (
98 | 56145050B08DD295484A34C98D3BB18A /* LICENSE */,
99 | 55CEA9EA72343FBA95732E034DBC36E7 /* README.md */,
100 | F259C53ED477ABA698074DBEE9FFF79E /* SwiftyNavigationBar.podspec */,
101 | );
102 | name = Pod;
103 | sourceTree = "";
104 | };
105 | 3ED3118A03FFA16BE5156C479AD38B54 /* Development Pods */ = {
106 | isa = PBXGroup;
107 | children = (
108 | 76D3C75E383C6CCA3359F06A71082CDF /* SwiftyNavigationBar */,
109 | );
110 | name = "Development Pods";
111 | sourceTree = "";
112 | };
113 | 76D3C75E383C6CCA3359F06A71082CDF /* SwiftyNavigationBar */ = {
114 | isa = PBXGroup;
115 | children = (
116 | FA5E2A143E3F852737C445D969004DDE /* NavigationBar.swift */,
117 | 0C36283C59D7CAB258C97F9200DDAD47 /* Proxy.swift */,
118 | 4046C5B43329BDA7FCE1502E0ADB040D /* Style.swift */,
119 | BBC2C22A6BBDB13EA951A4BE6A682FA7 /* SwiftyNavigationBar.swift */,
120 | 30C47F118C0454011C82D09356C78DF2 /* UINavigationController+SwiftyNavigationBar.swift */,
121 | 6603DC8C8651D8BBA0BA6C25EBB535BB /* UIViewController+SwiftyNavigationBar.swift */,
122 | 3D008D27E9B2EBB0CFFFC7F1A7A33E39 /* Pod */,
123 | AB1021626D56F0FEEC83CB5FEB721723 /* Support Files */,
124 | );
125 | name = SwiftyNavigationBar;
126 | path = ../..;
127 | sourceTree = "";
128 | };
129 | AB1021626D56F0FEEC83CB5FEB721723 /* Support Files */ = {
130 | isa = PBXGroup;
131 | children = (
132 | 9ADFBC0142977C0D4639149216BB6458 /* SwiftyNavigationBar.modulemap */,
133 | F14F59548239EB7779CC5EE243FDF48D /* SwiftyNavigationBar-dummy.m */,
134 | AB5F7C71B9B0D7B31A09F48074918DD3 /* SwiftyNavigationBar-prefix.pch */,
135 | 18C5B068FB087E0F3D595B8D4E3FF605 /* SwiftyNavigationBar-umbrella.h */,
136 | 1ED999FBF227FC5A32D73A9A02D2E0DC /* SwiftyNavigationBar.debug.xcconfig */,
137 | 99D479D9EA7AD0473B50CD8966D8672C /* SwiftyNavigationBar.release.xcconfig */,
138 | );
139 | name = "Support Files";
140 | path = "SwiftyNavigationBar_Demo/Pods/Target Support Files/SwiftyNavigationBar";
141 | sourceTree = "";
142 | };
143 | CF1408CF629C7361332E53B88F7BD30C = {
144 | isa = PBXGroup;
145 | children = (
146 | 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */,
147 | 3ED3118A03FFA16BE5156C479AD38B54 /* Development Pods */,
148 | D89477F20FB1DE18A04690586D7808C4 /* Frameworks */,
149 | 033441E3A55D4136D14FD3970ABEB85A /* Products */,
150 | 00529037EBC758502A38A5694AE155D5 /* Targets Support Files */,
151 | );
152 | sourceTree = "";
153 | };
154 | D89477F20FB1DE18A04690586D7808C4 /* Frameworks */ = {
155 | isa = PBXGroup;
156 | children = (
157 | );
158 | name = Frameworks;
159 | sourceTree = "";
160 | };
161 | DFD4BA4F64002FA7F47E70C42A8E9C91 /* Pods-SwiftyNavigationBar_Demo */ = {
162 | isa = PBXGroup;
163 | children = (
164 | 19BAD898F3E48D1ADA3733E111679CE7 /* Pods-SwiftyNavigationBar_Demo.modulemap */,
165 | DA40B154DF4A8D8996E592F11311CF2A /* Pods-SwiftyNavigationBar_Demo-acknowledgements.markdown */,
166 | 65BC703C31CB26880A489836587CD8E7 /* Pods-SwiftyNavigationBar_Demo-acknowledgements.plist */,
167 | 04EE89FB4108CF412D09F9EAC4282154 /* Pods-SwiftyNavigationBar_Demo-dummy.m */,
168 | 4DE2C6A28D35079DB0133C1ED63D924E /* Pods-SwiftyNavigationBar_Demo-umbrella.h */,
169 | A52243F642504AFD30AFBED0A4C774F1 /* Pods-SwiftyNavigationBar_Demo.debug.xcconfig */,
170 | 5F840309D86C1500C7F126084D183E7E /* Pods-SwiftyNavigationBar_Demo.release.xcconfig */,
171 | );
172 | name = "Pods-SwiftyNavigationBar_Demo";
173 | path = "Target Support Files/Pods-SwiftyNavigationBar_Demo";
174 | sourceTree = "";
175 | };
176 | /* End PBXGroup section */
177 |
178 | /* Begin PBXHeadersBuildPhase section */
179 | 89818A9BD852C5479413572DD3815FC7 /* Headers */ = {
180 | isa = PBXHeadersBuildPhase;
181 | buildActionMask = 2147483647;
182 | files = (
183 | 8CB920BCFCB55990875B3ED1534153BC /* SwiftyNavigationBar-umbrella.h in Headers */,
184 | );
185 | runOnlyForDeploymentPostprocessing = 0;
186 | };
187 | 9C24EA5B49F0C76EC4EA8F04B5DEF99C /* Headers */ = {
188 | isa = PBXHeadersBuildPhase;
189 | buildActionMask = 2147483647;
190 | files = (
191 | E81CA90BBDF17046EC40DE58A07FF1C6 /* Pods-SwiftyNavigationBar_Demo-umbrella.h in Headers */,
192 | );
193 | runOnlyForDeploymentPostprocessing = 0;
194 | };
195 | /* End PBXHeadersBuildPhase section */
196 |
197 | /* Begin PBXNativeTarget section */
198 | 28BF9E8D2D5B3453A7307626485B35B3 /* SwiftyNavigationBar */ = {
199 | isa = PBXNativeTarget;
200 | buildConfigurationList = 3592D6D4630D7B38CB645C5E85F89C63 /* Build configuration list for PBXNativeTarget "SwiftyNavigationBar" */;
201 | buildPhases = (
202 | 89818A9BD852C5479413572DD3815FC7 /* Headers */,
203 | 5F4E66F54A3B780534731419BC481078 /* Sources */,
204 | 7A92C96E44D94C5BBE010101F45BD4F3 /* Frameworks */,
205 | 1D975E60B5C682F2FBCE4941C5404796 /* Copy generated compatibility header */,
206 | );
207 | buildRules = (
208 | );
209 | dependencies = (
210 | );
211 | name = SwiftyNavigationBar;
212 | productName = SwiftyNavigationBar;
213 | productReference = 098B267E35182BC19A909BCB0441C1BF /* libSwiftyNavigationBar.a */;
214 | productType = "com.apple.product-type.library.static";
215 | };
216 | A4429324D959D6AEA96DCF05E3CF5F6E /* Pods-SwiftyNavigationBar_Demo */ = {
217 | isa = PBXNativeTarget;
218 | buildConfigurationList = 0C61A0A82EAB38C02BA05AD1DB01A5DB /* Build configuration list for PBXNativeTarget "Pods-SwiftyNavigationBar_Demo" */;
219 | buildPhases = (
220 | 9C24EA5B49F0C76EC4EA8F04B5DEF99C /* Headers */,
221 | 7B45B7C7F590486F4053DBD3249C6945 /* Sources */,
222 | F25689E934F875EBAFA58487CF763BBD /* Frameworks */,
223 | );
224 | buildRules = (
225 | );
226 | dependencies = (
227 | 9346DE5EE16B7BA92931F36BEB7EDEED /* PBXTargetDependency */,
228 | );
229 | name = "Pods-SwiftyNavigationBar_Demo";
230 | productName = "Pods-SwiftyNavigationBar_Demo";
231 | productReference = 4456FAC8A9968F4715D9916051211B2D /* libPods-SwiftyNavigationBar_Demo.a */;
232 | productType = "com.apple.product-type.library.static";
233 | };
234 | /* End PBXNativeTarget section */
235 |
236 | /* Begin PBXProject section */
237 | BFDFE7DC352907FC980B868725387E98 /* Project object */ = {
238 | isa = PBXProject;
239 | attributes = {
240 | LastSwiftUpdateCheck = 1100;
241 | LastUpgradeCheck = 1100;
242 | };
243 | buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */;
244 | compatibilityVersion = "Xcode 9.3";
245 | developmentRegion = en;
246 | hasScannedForEncodings = 0;
247 | knownRegions = (
248 | en,
249 | Base,
250 | );
251 | mainGroup = CF1408CF629C7361332E53B88F7BD30C;
252 | productRefGroup = 033441E3A55D4136D14FD3970ABEB85A /* Products */;
253 | projectDirPath = "";
254 | projectRoot = "";
255 | targets = (
256 | A4429324D959D6AEA96DCF05E3CF5F6E /* Pods-SwiftyNavigationBar_Demo */,
257 | 28BF9E8D2D5B3453A7307626485B35B3 /* SwiftyNavigationBar */,
258 | );
259 | };
260 | /* End PBXProject section */
261 |
262 | /* Begin PBXShellScriptBuildPhase section */
263 | 1D975E60B5C682F2FBCE4941C5404796 /* Copy generated compatibility header */ = {
264 | isa = PBXShellScriptBuildPhase;
265 | buildActionMask = 2147483647;
266 | files = (
267 | );
268 | inputFileListPaths = (
269 | );
270 | inputPaths = (
271 | "${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h",
272 | "${PODS_ROOT}/Headers/Public/SwiftyNavigationBar/SwiftyNavigationBar.modulemap",
273 | "${PODS_ROOT}/Headers/Public/SwiftyNavigationBar/SwiftyNavigationBar-umbrella.h",
274 | );
275 | name = "Copy generated compatibility header";
276 | outputFileListPaths = (
277 | );
278 | outputPaths = (
279 | "${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap",
280 | "${BUILT_PRODUCTS_DIR}/SwiftyNavigationBar-umbrella.h",
281 | "${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h",
282 | );
283 | runOnlyForDeploymentPostprocessing = 0;
284 | shellPath = /bin/sh;
285 | shellScript = "COMPATIBILITY_HEADER_PATH=\"${BUILT_PRODUCTS_DIR}/Swift Compatibility Header/${PRODUCT_MODULE_NAME}-Swift.h\"\nMODULE_MAP_PATH=\"${BUILT_PRODUCTS_DIR}/${PRODUCT_MODULE_NAME}.modulemap\"\n\nditto \"${DERIVED_SOURCES_DIR}/${PRODUCT_MODULE_NAME}-Swift.h\" \"${COMPATIBILITY_HEADER_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SwiftyNavigationBar/SwiftyNavigationBar.modulemap\" \"${MODULE_MAP_PATH}\"\nditto \"${PODS_ROOT}/Headers/Public/SwiftyNavigationBar/SwiftyNavigationBar-umbrella.h\" \"${BUILT_PRODUCTS_DIR}\"\nprintf \"\\n\\nmodule ${PRODUCT_MODULE_NAME}.Swift {\\n header \\\"${COMPATIBILITY_HEADER_PATH}\\\"\\n requires objc\\n}\\n\" >> \"${MODULE_MAP_PATH}\"\n";
286 | };
287 | /* End PBXShellScriptBuildPhase section */
288 |
289 | /* Begin PBXSourcesBuildPhase section */
290 | 5F4E66F54A3B780534731419BC481078 /* Sources */ = {
291 | isa = PBXSourcesBuildPhase;
292 | buildActionMask = 2147483647;
293 | files = (
294 | 49011BB9ADA4DF77C6B045C03B074BE3 /* NavigationBar.swift in Sources */,
295 | A3B834A79F7313392592DA4D6B0263DD /* Proxy.swift in Sources */,
296 | B7E7202CD42D21F62A1645024F633A80 /* Style.swift in Sources */,
297 | C0FE70E93886E3B696BA1B0D0C49FF5B /* SwiftyNavigationBar-dummy.m in Sources */,
298 | 90ABDD6B6ADD5EE897B298DB5D066A37 /* SwiftyNavigationBar.swift in Sources */,
299 | DB3656090D8F0751339E451EA2308D14 /* UINavigationController+SwiftyNavigationBar.swift in Sources */,
300 | C951C749D6F1E920E6BB050B0A997427 /* UIViewController+SwiftyNavigationBar.swift in Sources */,
301 | );
302 | runOnlyForDeploymentPostprocessing = 0;
303 | };
304 | 7B45B7C7F590486F4053DBD3249C6945 /* Sources */ = {
305 | isa = PBXSourcesBuildPhase;
306 | buildActionMask = 2147483647;
307 | files = (
308 | A915187467677E5CA3658E72DCEB9DED /* Pods-SwiftyNavigationBar_Demo-dummy.m in Sources */,
309 | );
310 | runOnlyForDeploymentPostprocessing = 0;
311 | };
312 | /* End PBXSourcesBuildPhase section */
313 |
314 | /* Begin PBXTargetDependency section */
315 | 9346DE5EE16B7BA92931F36BEB7EDEED /* PBXTargetDependency */ = {
316 | isa = PBXTargetDependency;
317 | name = SwiftyNavigationBar;
318 | target = 28BF9E8D2D5B3453A7307626485B35B3 /* SwiftyNavigationBar */;
319 | targetProxy = 164F302EA6303BDA09300B3C82BB5E82 /* PBXContainerItemProxy */;
320 | };
321 | /* End PBXTargetDependency section */
322 |
323 | /* Begin XCBuildConfiguration section */
324 | 196DFA3E4A09A28224918543529A1885 /* Debug */ = {
325 | isa = XCBuildConfiguration;
326 | buildSettings = {
327 | ALWAYS_SEARCH_USER_PATHS = NO;
328 | CLANG_ANALYZER_NONNULL = YES;
329 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
330 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
331 | CLANG_CXX_LIBRARY = "libc++";
332 | CLANG_ENABLE_MODULES = YES;
333 | CLANG_ENABLE_OBJC_ARC = YES;
334 | CLANG_ENABLE_OBJC_WEAK = YES;
335 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
336 | CLANG_WARN_BOOL_CONVERSION = YES;
337 | CLANG_WARN_COMMA = YES;
338 | CLANG_WARN_CONSTANT_CONVERSION = YES;
339 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
340 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
341 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
342 | CLANG_WARN_EMPTY_BODY = YES;
343 | CLANG_WARN_ENUM_CONVERSION = YES;
344 | CLANG_WARN_INFINITE_RECURSION = YES;
345 | CLANG_WARN_INT_CONVERSION = YES;
346 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
347 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
348 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
349 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
350 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
351 | CLANG_WARN_STRICT_PROTOTYPES = YES;
352 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
353 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
354 | CLANG_WARN_UNREACHABLE_CODE = YES;
355 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
356 | COPY_PHASE_STRIP = NO;
357 | DEBUG_INFORMATION_FORMAT = dwarf;
358 | ENABLE_STRICT_OBJC_MSGSEND = YES;
359 | ENABLE_TESTABILITY = YES;
360 | GCC_C_LANGUAGE_STANDARD = gnu11;
361 | GCC_DYNAMIC_NO_PIC = NO;
362 | GCC_NO_COMMON_BLOCKS = YES;
363 | GCC_OPTIMIZATION_LEVEL = 0;
364 | GCC_PREPROCESSOR_DEFINITIONS = (
365 | "POD_CONFIGURATION_DEBUG=1",
366 | "DEBUG=1",
367 | "$(inherited)",
368 | );
369 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
370 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
371 | GCC_WARN_UNDECLARED_SELECTOR = YES;
372 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
373 | GCC_WARN_UNUSED_FUNCTION = YES;
374 | GCC_WARN_UNUSED_VARIABLE = YES;
375 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
376 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
377 | MTL_FAST_MATH = YES;
378 | ONLY_ACTIVE_ARCH = YES;
379 | PRODUCT_NAME = "$(TARGET_NAME)";
380 | STRIP_INSTALLED_PRODUCT = NO;
381 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
382 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
383 | SWIFT_VERSION = 5.0;
384 | SYMROOT = "${SRCROOT}/../build";
385 | };
386 | name = Debug;
387 | };
388 | 1CCD576B0C30E38F79A63BB9382ADCA4 /* Release */ = {
389 | isa = XCBuildConfiguration;
390 | baseConfigurationReference = 99D479D9EA7AD0473B50CD8966D8672C /* SwiftyNavigationBar.release.xcconfig */;
391 | buildSettings = {
392 | CODE_SIGN_IDENTITY = "iPhone Developer";
393 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
394 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
395 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
396 | GCC_PREFIX_HEADER = "Target Support Files/SwiftyNavigationBar/SwiftyNavigationBar-prefix.pch";
397 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
398 | MODULEMAP_FILE = Headers/Public/SwiftyNavigationBar/SwiftyNavigationBar.modulemap;
399 | OTHER_LDFLAGS = "";
400 | OTHER_LIBTOOLFLAGS = "";
401 | PRIVATE_HEADERS_FOLDER_PATH = "";
402 | PRODUCT_MODULE_NAME = SwiftyNavigationBar;
403 | PRODUCT_NAME = SwiftyNavigationBar;
404 | PUBLIC_HEADERS_FOLDER_PATH = "";
405 | SDKROOT = iphoneos;
406 | SKIP_INSTALL = YES;
407 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
408 | SWIFT_VERSION = 5.0;
409 | TARGETED_DEVICE_FAMILY = "1,2";
410 | VALIDATE_PRODUCT = YES;
411 | };
412 | name = Release;
413 | };
414 | 4DC08B4D237CDADAC3CB9B703E229A89 /* Debug */ = {
415 | isa = XCBuildConfiguration;
416 | baseConfigurationReference = A52243F642504AFD30AFBED0A4C774F1 /* Pods-SwiftyNavigationBar_Demo.debug.xcconfig */;
417 | buildSettings = {
418 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
419 | CLANG_ENABLE_OBJC_WEAK = NO;
420 | CODE_SIGN_IDENTITY = "iPhone Developer";
421 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
422 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
423 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
424 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
425 | MACH_O_TYPE = staticlib;
426 | MODULEMAP_FILE = "Target Support Files/Pods-SwiftyNavigationBar_Demo/Pods-SwiftyNavigationBar_Demo.modulemap";
427 | OTHER_LDFLAGS = "";
428 | OTHER_LIBTOOLFLAGS = "";
429 | PODS_ROOT = "$(SRCROOT)";
430 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
431 | SDKROOT = iphoneos;
432 | SKIP_INSTALL = YES;
433 | TARGETED_DEVICE_FAMILY = "1,2";
434 | };
435 | name = Debug;
436 | };
437 | B01D14FDC83DCF9D4BE53066BEA96D05 /* Release */ = {
438 | isa = XCBuildConfiguration;
439 | buildSettings = {
440 | ALWAYS_SEARCH_USER_PATHS = NO;
441 | CLANG_ANALYZER_NONNULL = YES;
442 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
443 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
444 | CLANG_CXX_LIBRARY = "libc++";
445 | CLANG_ENABLE_MODULES = YES;
446 | CLANG_ENABLE_OBJC_ARC = YES;
447 | CLANG_ENABLE_OBJC_WEAK = YES;
448 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
449 | CLANG_WARN_BOOL_CONVERSION = YES;
450 | CLANG_WARN_COMMA = YES;
451 | CLANG_WARN_CONSTANT_CONVERSION = YES;
452 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
453 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
454 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
455 | CLANG_WARN_EMPTY_BODY = YES;
456 | CLANG_WARN_ENUM_CONVERSION = YES;
457 | CLANG_WARN_INFINITE_RECURSION = YES;
458 | CLANG_WARN_INT_CONVERSION = YES;
459 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
460 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
461 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
462 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
463 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
464 | CLANG_WARN_STRICT_PROTOTYPES = YES;
465 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
466 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
467 | CLANG_WARN_UNREACHABLE_CODE = YES;
468 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
469 | COPY_PHASE_STRIP = NO;
470 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
471 | ENABLE_NS_ASSERTIONS = NO;
472 | ENABLE_STRICT_OBJC_MSGSEND = YES;
473 | GCC_C_LANGUAGE_STANDARD = gnu11;
474 | GCC_NO_COMMON_BLOCKS = YES;
475 | GCC_PREPROCESSOR_DEFINITIONS = (
476 | "POD_CONFIGURATION_RELEASE=1",
477 | "$(inherited)",
478 | );
479 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
480 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
481 | GCC_WARN_UNDECLARED_SELECTOR = YES;
482 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
483 | GCC_WARN_UNUSED_FUNCTION = YES;
484 | GCC_WARN_UNUSED_VARIABLE = YES;
485 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
486 | MTL_ENABLE_DEBUG_INFO = NO;
487 | MTL_FAST_MATH = YES;
488 | PRODUCT_NAME = "$(TARGET_NAME)";
489 | STRIP_INSTALLED_PRODUCT = NO;
490 | SWIFT_COMPILATION_MODE = wholemodule;
491 | SWIFT_OPTIMIZATION_LEVEL = "-O";
492 | SWIFT_VERSION = 5.0;
493 | SYMROOT = "${SRCROOT}/../build";
494 | };
495 | name = Release;
496 | };
497 | BFFC911E65E30B699CA2D5A6F01E8774 /* Release */ = {
498 | isa = XCBuildConfiguration;
499 | baseConfigurationReference = 5F840309D86C1500C7F126084D183E7E /* Pods-SwiftyNavigationBar_Demo.release.xcconfig */;
500 | buildSettings = {
501 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO;
502 | CLANG_ENABLE_OBJC_WEAK = NO;
503 | CODE_SIGN_IDENTITY = "iPhone Developer";
504 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
505 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
506 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
507 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
508 | MACH_O_TYPE = staticlib;
509 | MODULEMAP_FILE = "Target Support Files/Pods-SwiftyNavigationBar_Demo/Pods-SwiftyNavigationBar_Demo.modulemap";
510 | OTHER_LDFLAGS = "";
511 | OTHER_LIBTOOLFLAGS = "";
512 | PODS_ROOT = "$(SRCROOT)";
513 | PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}";
514 | SDKROOT = iphoneos;
515 | SKIP_INSTALL = YES;
516 | TARGETED_DEVICE_FAMILY = "1,2";
517 | VALIDATE_PRODUCT = YES;
518 | };
519 | name = Release;
520 | };
521 | D449C2A1C013C27AC35BB1D52E27EE29 /* Debug */ = {
522 | isa = XCBuildConfiguration;
523 | baseConfigurationReference = 1ED999FBF227FC5A32D73A9A02D2E0DC /* SwiftyNavigationBar.debug.xcconfig */;
524 | buildSettings = {
525 | CODE_SIGN_IDENTITY = "iPhone Developer";
526 | "CODE_SIGN_IDENTITY[sdk=appletvos*]" = "";
527 | "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
528 | "CODE_SIGN_IDENTITY[sdk=watchos*]" = "";
529 | GCC_PREFIX_HEADER = "Target Support Files/SwiftyNavigationBar/SwiftyNavigationBar-prefix.pch";
530 | IPHONEOS_DEPLOYMENT_TARGET = 8.0;
531 | MODULEMAP_FILE = Headers/Public/SwiftyNavigationBar/SwiftyNavigationBar.modulemap;
532 | OTHER_LDFLAGS = "";
533 | OTHER_LIBTOOLFLAGS = "";
534 | PRIVATE_HEADERS_FOLDER_PATH = "";
535 | PRODUCT_MODULE_NAME = SwiftyNavigationBar;
536 | PRODUCT_NAME = SwiftyNavigationBar;
537 | PUBLIC_HEADERS_FOLDER_PATH = "";
538 | SDKROOT = iphoneos;
539 | SKIP_INSTALL = YES;
540 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) ";
541 | SWIFT_VERSION = 5.0;
542 | TARGETED_DEVICE_FAMILY = "1,2";
543 | };
544 | name = Debug;
545 | };
546 | /* End XCBuildConfiguration section */
547 |
548 | /* Begin XCConfigurationList section */
549 | 0C61A0A82EAB38C02BA05AD1DB01A5DB /* Build configuration list for PBXNativeTarget "Pods-SwiftyNavigationBar_Demo" */ = {
550 | isa = XCConfigurationList;
551 | buildConfigurations = (
552 | 4DC08B4D237CDADAC3CB9B703E229A89 /* Debug */,
553 | BFFC911E65E30B699CA2D5A6F01E8774 /* Release */,
554 | );
555 | defaultConfigurationIsVisible = 0;
556 | defaultConfigurationName = Release;
557 | };
558 | 3592D6D4630D7B38CB645C5E85F89C63 /* Build configuration list for PBXNativeTarget "SwiftyNavigationBar" */ = {
559 | isa = XCConfigurationList;
560 | buildConfigurations = (
561 | D449C2A1C013C27AC35BB1D52E27EE29 /* Debug */,
562 | 1CCD576B0C30E38F79A63BB9382ADCA4 /* Release */,
563 | );
564 | defaultConfigurationIsVisible = 0;
565 | defaultConfigurationName = Release;
566 | };
567 | 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = {
568 | isa = XCConfigurationList;
569 | buildConfigurations = (
570 | 196DFA3E4A09A28224918543529A1885 /* Debug */,
571 | B01D14FDC83DCF9D4BE53066BEA96D05 /* Release */,
572 | );
573 | defaultConfigurationIsVisible = 0;
574 | defaultConfigurationName = Release;
575 | };
576 | /* End XCConfigurationList section */
577 | };
578 | rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */;
579 | }
580 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/Pods/Target Support Files/Pods-SwiftyNavigationBar_Demo/Pods-SwiftyNavigationBar_Demo-acknowledgements.markdown:
--------------------------------------------------------------------------------
1 | # Acknowledgements
2 | This application makes use of the following third party libraries:
3 |
4 | ## SwiftyNavigationBar
5 |
6 | Copyright (c) 2019 wlgemini
7 |
8 | Permission is hereby granted, free of charge, to any person obtaining a copy
9 | of this software and associated documentation files (the "Software"), to deal
10 | in the Software without restriction, including without limitation the rights
11 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12 | copies of the Software, and to permit persons to whom the Software is
13 | furnished to do so, subject to the following conditions:
14 |
15 | The above copyright notice and this permission notice shall be included in
16 | all copies or substantial portions of the Software.
17 |
18 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24 | THE SOFTWARE.
25 |
26 | Generated by CocoaPods - https://cocoapods.org
27 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/Pods/Target Support Files/Pods-SwiftyNavigationBar_Demo/Pods-SwiftyNavigationBar_Demo-acknowledgements.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | PreferenceSpecifiers
6 |
7 |
8 | FooterText
9 | This application makes use of the following third party libraries:
10 | Title
11 | Acknowledgements
12 | Type
13 | PSGroupSpecifier
14 |
15 |
16 | FooterText
17 | Copyright (c) 2019 wlgemini <wangluguang@live.com>
18 |
19 | Permission is hereby granted, free of charge, to any person obtaining a copy
20 | of this software and associated documentation files (the "Software"), to deal
21 | in the Software without restriction, including without limitation the rights
22 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
23 | copies of the Software, and to permit persons to whom the Software is
24 | furnished to do so, subject to the following conditions:
25 |
26 | The above copyright notice and this permission notice shall be included in
27 | all copies or substantial portions of the Software.
28 |
29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
35 | THE SOFTWARE.
36 |
37 | License
38 | MIT
39 | Title
40 | SwiftyNavigationBar
41 | Type
42 | PSGroupSpecifier
43 |
44 |
45 | FooterText
46 | Generated by CocoaPods - https://cocoapods.org
47 | Title
48 |
49 | Type
50 | PSGroupSpecifier
51 |
52 |
53 | StringsTable
54 | Acknowledgements
55 | Title
56 | Acknowledgements
57 |
58 |
59 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/Pods/Target Support Files/Pods-SwiftyNavigationBar_Demo/Pods-SwiftyNavigationBar_Demo-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_SwiftyNavigationBar_Demo : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_SwiftyNavigationBar_Demo
5 | @end
6 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/Pods/Target Support Files/Pods-SwiftyNavigationBar_Demo/Pods-SwiftyNavigationBar_Demo-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double Pods_SwiftyNavigationBar_DemoVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char Pods_SwiftyNavigationBar_DemoVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/Pods/Target Support Files/Pods-SwiftyNavigationBar_Demo/Pods-SwiftyNavigationBar_Demo.debug.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyNavigationBar"
4 | OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftyNavigationBar/SwiftyNavigationBar.modulemap"
5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"SwiftyNavigationBar" -framework "UIKit"
6 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftyNavigationBar/SwiftyNavigationBar.modulemap"
7 | PODS_BUILD_DIR = ${BUILD_DIR}
8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
9 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
10 | PODS_ROOT = ${SRCROOT}/Pods
11 | SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyNavigationBar"
12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
13 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/Pods/Target Support Files/Pods-SwiftyNavigationBar_Demo/Pods-SwiftyNavigationBar_Demo.modulemap:
--------------------------------------------------------------------------------
1 | module Pods_SwiftyNavigationBar_Demo {
2 | umbrella header "Pods-SwiftyNavigationBar_Demo-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/Pods/Target Support Files/Pods-SwiftyNavigationBar_Demo/Pods-SwiftyNavigationBar_Demo.release.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | LIBRARY_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyNavigationBar"
4 | OTHER_CFLAGS = $(inherited) -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftyNavigationBar/SwiftyNavigationBar.modulemap"
5 | OTHER_LDFLAGS = $(inherited) -ObjC -l"SwiftyNavigationBar" -framework "UIKit"
6 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -Xcc -fmodule-map-file="${PODS_CONFIGURATION_BUILD_DIR}/SwiftyNavigationBar/SwiftyNavigationBar.modulemap"
7 | PODS_BUILD_DIR = ${BUILD_DIR}
8 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
9 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
10 | PODS_ROOT = ${SRCROOT}/Pods
11 | SWIFT_INCLUDE_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/SwiftyNavigationBar"
12 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
13 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/Pods/Target Support Files/SwiftyNavigationBar/SwiftyNavigationBar-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_SwiftyNavigationBar : NSObject
3 | @end
4 | @implementation PodsDummy_SwiftyNavigationBar
5 | @end
6 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/Pods/Target Support Files/SwiftyNavigationBar/SwiftyNavigationBar-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/Pods/Target Support Files/SwiftyNavigationBar/SwiftyNavigationBar-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double SwiftyNavigationBarVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char SwiftyNavigationBarVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/Pods/Target Support Files/SwiftyNavigationBar/SwiftyNavigationBar.debug.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftyNavigationBar
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}"
4 | PODS_BUILD_DIR = ${BUILD_DIR}
5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
6 | PODS_ROOT = ${SRCROOT}
7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../..
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
11 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/Pods/Target Support Files/SwiftyNavigationBar/SwiftyNavigationBar.modulemap:
--------------------------------------------------------------------------------
1 | module SwiftyNavigationBar {
2 | umbrella header "SwiftyNavigationBar-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/Pods/Target Support Files/SwiftyNavigationBar/SwiftyNavigationBar.release.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftyNavigationBar
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}"
4 | PODS_BUILD_DIR = ${BUILD_DIR}
5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
6 | PODS_ROOT = ${SRCROOT}
7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../..
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 | USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES
11 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/Pods/Target Support Files/SwiftyNavigationBar/SwiftyNavigationBar.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/SwiftyNavigationBar
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS -import-underlying-module -Xcc -fmodule-map-file="${SRCROOT}/${MODULEMAP_FILE}"
4 | PODS_BUILD_DIR = ${BUILD_DIR}
5 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
6 | PODS_ROOT = ${SRCROOT}
7 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../..
8 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
9 | SKIP_INSTALL = YES
10 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/SwiftyNavigationBar_Demo.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 50;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | CA3B58BB21F059E500323498 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA3B58BA21F059E500323498 /* AppDelegate.swift */; };
11 | CA3B58C221F059E600323498 /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = CA3B58C121F059E600323498 /* Assets.xcassets */; };
12 | CA3B58C521F059E600323498 /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = CA3B58C321F059E600323498 /* LaunchScreen.storyboard */; };
13 | CACDAE9521F99C1C003AD7CC /* SettingViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CACDAE9421F99C1C003AD7CC /* SettingViewController.swift */; };
14 | CACDAE9721F99C37003AD7CC /* MineViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = CACDAE9621F99C37003AD7CC /* MineViewController.swift */; };
15 | CACDAE9921F9AA38003AD7CC /* TableViewDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = CACDAE9821F9AA38003AD7CC /* TableViewDelegate.swift */; };
16 | E4EF1F23126DE7C5ECCD366D /* libPods-SwiftyNavigationBar_Demo.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 37C5363545CCD9F35C379327 /* libPods-SwiftyNavigationBar_Demo.a */; };
17 | /* End PBXBuildFile section */
18 |
19 | /* Begin PBXFileReference section */
20 | 37C5363545CCD9F35C379327 /* libPods-SwiftyNavigationBar_Demo.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SwiftyNavigationBar_Demo.a"; sourceTree = BUILT_PRODUCTS_DIR; };
21 | 38433BE046465078445D8FA5 /* Pods-SwiftyNavigationBar_Demo.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftyNavigationBar_Demo.release.xcconfig"; path = "Target Support Files/Pods-SwiftyNavigationBar_Demo/Pods-SwiftyNavigationBar_Demo.release.xcconfig"; sourceTree = ""; };
22 | 962F5ECC71A9BA8275162398 /* Pods-SwiftyNavigationBar_Demo.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftyNavigationBar_Demo.debug.xcconfig"; path = "Target Support Files/Pods-SwiftyNavigationBar_Demo/Pods-SwiftyNavigationBar_Demo.debug.xcconfig"; sourceTree = ""; };
23 | CA3B58B721F059E500323498 /* SwiftyNavigationBar_Demo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftyNavigationBar_Demo.app; sourceTree = BUILT_PRODUCTS_DIR; };
24 | CA3B58BA21F059E500323498 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
25 | CA3B58C121F059E600323498 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
26 | CA3B58C421F059E600323498 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
27 | CA3B58C621F059E600323498 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
28 | CACDAE9421F99C1C003AD7CC /* SettingViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingViewController.swift; sourceTree = ""; };
29 | CACDAE9621F99C37003AD7CC /* MineViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MineViewController.swift; sourceTree = ""; };
30 | CACDAE9821F9AA38003AD7CC /* TableViewDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TableViewDelegate.swift; sourceTree = ""; };
31 | /* End PBXFileReference section */
32 |
33 | /* Begin PBXFrameworksBuildPhase section */
34 | CA3B58B421F059E500323498 /* Frameworks */ = {
35 | isa = PBXFrameworksBuildPhase;
36 | buildActionMask = 2147483647;
37 | files = (
38 | E4EF1F23126DE7C5ECCD366D /* libPods-SwiftyNavigationBar_Demo.a in Frameworks */,
39 | );
40 | runOnlyForDeploymentPostprocessing = 0;
41 | };
42 | /* End PBXFrameworksBuildPhase section */
43 |
44 | /* Begin PBXGroup section */
45 | 224FE2F2BC8AC25012B6736B /* Frameworks */ = {
46 | isa = PBXGroup;
47 | children = (
48 | 37C5363545CCD9F35C379327 /* libPods-SwiftyNavigationBar_Demo.a */,
49 | );
50 | name = Frameworks;
51 | sourceTree = "";
52 | };
53 | A38724A7179FE9F350F7FBAA /* Pods */ = {
54 | isa = PBXGroup;
55 | children = (
56 | 962F5ECC71A9BA8275162398 /* Pods-SwiftyNavigationBar_Demo.debug.xcconfig */,
57 | 38433BE046465078445D8FA5 /* Pods-SwiftyNavigationBar_Demo.release.xcconfig */,
58 | );
59 | path = Pods;
60 | sourceTree = "";
61 | };
62 | CA3B58AE21F059E500323498 = {
63 | isa = PBXGroup;
64 | children = (
65 | CA3B58B921F059E500323498 /* SwiftyNavigationBar_Demo */,
66 | CA3B58B821F059E500323498 /* Products */,
67 | A38724A7179FE9F350F7FBAA /* Pods */,
68 | 224FE2F2BC8AC25012B6736B /* Frameworks */,
69 | );
70 | sourceTree = "";
71 | };
72 | CA3B58B821F059E500323498 /* Products */ = {
73 | isa = PBXGroup;
74 | children = (
75 | CA3B58B721F059E500323498 /* SwiftyNavigationBar_Demo.app */,
76 | );
77 | name = Products;
78 | sourceTree = "";
79 | };
80 | CA3B58B921F059E500323498 /* SwiftyNavigationBar_Demo */ = {
81 | isa = PBXGroup;
82 | children = (
83 | CA3B58BA21F059E500323498 /* AppDelegate.swift */,
84 | CACDAE9421F99C1C003AD7CC /* SettingViewController.swift */,
85 | CACDAE9621F99C37003AD7CC /* MineViewController.swift */,
86 | CACDAE9821F9AA38003AD7CC /* TableViewDelegate.swift */,
87 | CA3B58C121F059E600323498 /* Assets.xcassets */,
88 | CA3B58C321F059E600323498 /* LaunchScreen.storyboard */,
89 | CA3B58C621F059E600323498 /* Info.plist */,
90 | );
91 | path = SwiftyNavigationBar_Demo;
92 | sourceTree = "";
93 | };
94 | /* End PBXGroup section */
95 |
96 | /* Begin PBXNativeTarget section */
97 | CA3B58B621F059E500323498 /* SwiftyNavigationBar_Demo */ = {
98 | isa = PBXNativeTarget;
99 | buildConfigurationList = CA3B58C921F059E600323498 /* Build configuration list for PBXNativeTarget "SwiftyNavigationBar_Demo" */;
100 | buildPhases = (
101 | DBD735D3832C5FC35BCFC57F /* [CP] Check Pods Manifest.lock */,
102 | CA3B58B321F059E500323498 /* Sources */,
103 | CA3B58B421F059E500323498 /* Frameworks */,
104 | CA3B58B521F059E500323498 /* Resources */,
105 | );
106 | buildRules = (
107 | );
108 | dependencies = (
109 | );
110 | name = SwiftyNavigationBar_Demo;
111 | productName = SwiftyNavigationBar_Demo;
112 | productReference = CA3B58B721F059E500323498 /* SwiftyNavigationBar_Demo.app */;
113 | productType = "com.apple.product-type.application";
114 | };
115 | /* End PBXNativeTarget section */
116 |
117 | /* Begin PBXProject section */
118 | CA3B58AF21F059E500323498 /* Project object */ = {
119 | isa = PBXProject;
120 | attributes = {
121 | LastSwiftUpdateCheck = 1010;
122 | LastUpgradeCheck = 1010;
123 | ORGANIZATIONNAME = wlgemini;
124 | TargetAttributes = {
125 | CA3B58B621F059E500323498 = {
126 | CreatedOnToolsVersion = 10.1;
127 | };
128 | };
129 | };
130 | buildConfigurationList = CA3B58B221F059E500323498 /* Build configuration list for PBXProject "SwiftyNavigationBar_Demo" */;
131 | compatibilityVersion = "Xcode 9.3";
132 | developmentRegion = en;
133 | hasScannedForEncodings = 0;
134 | knownRegions = (
135 | en,
136 | Base,
137 | );
138 | mainGroup = CA3B58AE21F059E500323498;
139 | productRefGroup = CA3B58B821F059E500323498 /* Products */;
140 | projectDirPath = "";
141 | projectRoot = "";
142 | targets = (
143 | CA3B58B621F059E500323498 /* SwiftyNavigationBar_Demo */,
144 | );
145 | };
146 | /* End PBXProject section */
147 |
148 | /* Begin PBXResourcesBuildPhase section */
149 | CA3B58B521F059E500323498 /* Resources */ = {
150 | isa = PBXResourcesBuildPhase;
151 | buildActionMask = 2147483647;
152 | files = (
153 | CA3B58C521F059E600323498 /* LaunchScreen.storyboard in Resources */,
154 | CA3B58C221F059E600323498 /* Assets.xcassets in Resources */,
155 | );
156 | runOnlyForDeploymentPostprocessing = 0;
157 | };
158 | /* End PBXResourcesBuildPhase section */
159 |
160 | /* Begin PBXShellScriptBuildPhase section */
161 | DBD735D3832C5FC35BCFC57F /* [CP] Check Pods Manifest.lock */ = {
162 | isa = PBXShellScriptBuildPhase;
163 | buildActionMask = 2147483647;
164 | files = (
165 | );
166 | inputFileListPaths = (
167 | );
168 | inputPaths = (
169 | "${PODS_PODFILE_DIR_PATH}/Podfile.lock",
170 | "${PODS_ROOT}/Manifest.lock",
171 | );
172 | name = "[CP] Check Pods Manifest.lock";
173 | outputFileListPaths = (
174 | );
175 | outputPaths = (
176 | "$(DERIVED_FILE_DIR)/Pods-SwiftyNavigationBar_Demo-checkManifestLockResult.txt",
177 | );
178 | runOnlyForDeploymentPostprocessing = 0;
179 | shellPath = /bin/sh;
180 | shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
181 | showEnvVarsInLog = 0;
182 | };
183 | /* End PBXShellScriptBuildPhase section */
184 |
185 | /* Begin PBXSourcesBuildPhase section */
186 | CA3B58B321F059E500323498 /* Sources */ = {
187 | isa = PBXSourcesBuildPhase;
188 | buildActionMask = 2147483647;
189 | files = (
190 | CACDAE9921F9AA38003AD7CC /* TableViewDelegate.swift in Sources */,
191 | CA3B58BB21F059E500323498 /* AppDelegate.swift in Sources */,
192 | CACDAE9521F99C1C003AD7CC /* SettingViewController.swift in Sources */,
193 | CACDAE9721F99C37003AD7CC /* MineViewController.swift in Sources */,
194 | );
195 | runOnlyForDeploymentPostprocessing = 0;
196 | };
197 | /* End PBXSourcesBuildPhase section */
198 |
199 | /* Begin PBXVariantGroup section */
200 | CA3B58C321F059E600323498 /* LaunchScreen.storyboard */ = {
201 | isa = PBXVariantGroup;
202 | children = (
203 | CA3B58C421F059E600323498 /* Base */,
204 | );
205 | name = LaunchScreen.storyboard;
206 | sourceTree = "";
207 | };
208 | /* End PBXVariantGroup section */
209 |
210 | /* Begin XCBuildConfiguration section */
211 | CA3B58C721F059E600323498 /* Debug */ = {
212 | isa = XCBuildConfiguration;
213 | buildSettings = {
214 | ALWAYS_SEARCH_USER_PATHS = NO;
215 | CLANG_ANALYZER_NONNULL = YES;
216 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
217 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
218 | CLANG_CXX_LIBRARY = "libc++";
219 | CLANG_ENABLE_MODULES = YES;
220 | CLANG_ENABLE_OBJC_ARC = YES;
221 | CLANG_ENABLE_OBJC_WEAK = YES;
222 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
223 | CLANG_WARN_BOOL_CONVERSION = YES;
224 | CLANG_WARN_COMMA = YES;
225 | CLANG_WARN_CONSTANT_CONVERSION = YES;
226 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
227 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
228 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
229 | CLANG_WARN_EMPTY_BODY = YES;
230 | CLANG_WARN_ENUM_CONVERSION = YES;
231 | CLANG_WARN_INFINITE_RECURSION = YES;
232 | CLANG_WARN_INT_CONVERSION = YES;
233 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
234 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
235 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
236 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
237 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
238 | CLANG_WARN_STRICT_PROTOTYPES = YES;
239 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
240 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
241 | CLANG_WARN_UNREACHABLE_CODE = YES;
242 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
243 | CODE_SIGN_IDENTITY = "iPhone Developer";
244 | COPY_PHASE_STRIP = NO;
245 | DEBUG_INFORMATION_FORMAT = dwarf;
246 | ENABLE_STRICT_OBJC_MSGSEND = YES;
247 | ENABLE_TESTABILITY = YES;
248 | GCC_C_LANGUAGE_STANDARD = gnu11;
249 | GCC_DYNAMIC_NO_PIC = NO;
250 | GCC_NO_COMMON_BLOCKS = YES;
251 | GCC_OPTIMIZATION_LEVEL = 0;
252 | GCC_PREPROCESSOR_DEFINITIONS = (
253 | "DEBUG=1",
254 | "$(inherited)",
255 | );
256 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
257 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
258 | GCC_WARN_UNDECLARED_SELECTOR = YES;
259 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
260 | GCC_WARN_UNUSED_FUNCTION = YES;
261 | GCC_WARN_UNUSED_VARIABLE = YES;
262 | IPHONEOS_DEPLOYMENT_TARGET = 12.1;
263 | MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
264 | MTL_FAST_MATH = YES;
265 | ONLY_ACTIVE_ARCH = YES;
266 | SDKROOT = iphoneos;
267 | SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
268 | SWIFT_OPTIMIZATION_LEVEL = "-Onone";
269 | };
270 | name = Debug;
271 | };
272 | CA3B58C821F059E600323498 /* Release */ = {
273 | isa = XCBuildConfiguration;
274 | buildSettings = {
275 | ALWAYS_SEARCH_USER_PATHS = NO;
276 | CLANG_ANALYZER_NONNULL = YES;
277 | CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
278 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++14";
279 | CLANG_CXX_LIBRARY = "libc++";
280 | CLANG_ENABLE_MODULES = YES;
281 | CLANG_ENABLE_OBJC_ARC = YES;
282 | CLANG_ENABLE_OBJC_WEAK = YES;
283 | CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
284 | CLANG_WARN_BOOL_CONVERSION = YES;
285 | CLANG_WARN_COMMA = YES;
286 | CLANG_WARN_CONSTANT_CONVERSION = YES;
287 | CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
288 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
289 | CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
290 | CLANG_WARN_EMPTY_BODY = YES;
291 | CLANG_WARN_ENUM_CONVERSION = YES;
292 | CLANG_WARN_INFINITE_RECURSION = YES;
293 | CLANG_WARN_INT_CONVERSION = YES;
294 | CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
295 | CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
296 | CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
297 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
298 | CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
299 | CLANG_WARN_STRICT_PROTOTYPES = YES;
300 | CLANG_WARN_SUSPICIOUS_MOVE = YES;
301 | CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
302 | CLANG_WARN_UNREACHABLE_CODE = YES;
303 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
304 | CODE_SIGN_IDENTITY = "iPhone Developer";
305 | COPY_PHASE_STRIP = NO;
306 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
307 | ENABLE_NS_ASSERTIONS = NO;
308 | ENABLE_STRICT_OBJC_MSGSEND = YES;
309 | GCC_C_LANGUAGE_STANDARD = gnu11;
310 | GCC_NO_COMMON_BLOCKS = YES;
311 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
312 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
313 | GCC_WARN_UNDECLARED_SELECTOR = YES;
314 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
315 | GCC_WARN_UNUSED_FUNCTION = YES;
316 | GCC_WARN_UNUSED_VARIABLE = YES;
317 | IPHONEOS_DEPLOYMENT_TARGET = 12.1;
318 | MTL_ENABLE_DEBUG_INFO = NO;
319 | MTL_FAST_MATH = YES;
320 | SDKROOT = iphoneos;
321 | SWIFT_COMPILATION_MODE = wholemodule;
322 | SWIFT_OPTIMIZATION_LEVEL = "-O";
323 | VALIDATE_PRODUCT = YES;
324 | };
325 | name = Release;
326 | };
327 | CA3B58CA21F059E600323498 /* Debug */ = {
328 | isa = XCBuildConfiguration;
329 | baseConfigurationReference = 962F5ECC71A9BA8275162398 /* Pods-SwiftyNavigationBar_Demo.debug.xcconfig */;
330 | buildSettings = {
331 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
332 | CODE_SIGN_IDENTITY = "iPhone Developer";
333 | CODE_SIGN_STYLE = Automatic;
334 | DEVELOPMENT_TEAM = 77W7FJ8RM6;
335 | INFOPLIST_FILE = SwiftyNavigationBar_Demo/Info.plist;
336 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
337 | LD_RUNPATH_SEARCH_PATHS = (
338 | "$(inherited)",
339 | "@executable_path/Frameworks",
340 | );
341 | PRODUCT_BUNDLE_IDENTIFIER = "com.wlgemini.SwiftyNavigationBar-Demo";
342 | PRODUCT_NAME = "$(TARGET_NAME)";
343 | PROVISIONING_PROFILE_SPECIFIER = "";
344 | SWIFT_VERSION = 5.0;
345 | TARGETED_DEVICE_FAMILY = 1;
346 | };
347 | name = Debug;
348 | };
349 | CA3B58CB21F059E600323498 /* Release */ = {
350 | isa = XCBuildConfiguration;
351 | baseConfigurationReference = 38433BE046465078445D8FA5 /* Pods-SwiftyNavigationBar_Demo.release.xcconfig */;
352 | buildSettings = {
353 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
354 | CODE_SIGN_IDENTITY = "iPhone Developer";
355 | CODE_SIGN_STYLE = Automatic;
356 | DEVELOPMENT_TEAM = 77W7FJ8RM6;
357 | INFOPLIST_FILE = SwiftyNavigationBar_Demo/Info.plist;
358 | IPHONEOS_DEPLOYMENT_TARGET = 10.0;
359 | LD_RUNPATH_SEARCH_PATHS = (
360 | "$(inherited)",
361 | "@executable_path/Frameworks",
362 | );
363 | PRODUCT_BUNDLE_IDENTIFIER = "com.wlgemini.SwiftyNavigationBar-Demo";
364 | PRODUCT_NAME = "$(TARGET_NAME)";
365 | PROVISIONING_PROFILE_SPECIFIER = "";
366 | SWIFT_VERSION = 5.0;
367 | TARGETED_DEVICE_FAMILY = 1;
368 | };
369 | name = Release;
370 | };
371 | /* End XCBuildConfiguration section */
372 |
373 | /* Begin XCConfigurationList section */
374 | CA3B58B221F059E500323498 /* Build configuration list for PBXProject "SwiftyNavigationBar_Demo" */ = {
375 | isa = XCConfigurationList;
376 | buildConfigurations = (
377 | CA3B58C721F059E600323498 /* Debug */,
378 | CA3B58C821F059E600323498 /* Release */,
379 | );
380 | defaultConfigurationIsVisible = 0;
381 | defaultConfigurationName = Release;
382 | };
383 | CA3B58C921F059E600323498 /* Build configuration list for PBXNativeTarget "SwiftyNavigationBar_Demo" */ = {
384 | isa = XCConfigurationList;
385 | buildConfigurations = (
386 | CA3B58CA21F059E600323498 /* Debug */,
387 | CA3B58CB21F059E600323498 /* Release */,
388 | );
389 | defaultConfigurationIsVisible = 0;
390 | defaultConfigurationName = Release;
391 | };
392 | /* End XCConfigurationList section */
393 | };
394 | rootObject = CA3B58AF21F059E500323498 /* Project object */;
395 | }
396 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/SwiftyNavigationBar_Demo.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/SwiftyNavigationBar_Demo.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/SwiftyNavigationBar_Demo.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/SwiftyNavigationBar_Demo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/SwiftyNavigationBar_Demo/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // AppDelegate.swift
3 | //
4 |
5 | import UIKit
6 | import SwiftyNavigationBar
7 |
8 | @UIApplicationMain
9 | class AppDelegate: UIResponder, UIApplicationDelegate {
10 |
11 | var window: UIWindow?
12 |
13 | func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
14 |
15 | self.window = UIWindow(frame: UIScreen.main.bounds)
16 |
17 | // 设置全局样式
18 | Style.isWhiteBarStyle = false
19 | Style.shadowImageAlpha = 0.25
20 |
21 | // settingNav
22 | let settingNav = UINavigationController(rootViewController: SettingViewController(), preference: { (style) in
23 | style.backgroundEffect = .blur(.light)
24 | })
25 | settingNav.tabBarItem = UITabBarItem(title: "Setting", image: nil, selectedImage: nil)
26 | settingNav.snb.navigationControllerDelegate = self
27 |
28 | // tabBar
29 | let tabBar = UITabBarController()
30 | tabBar.viewControllers = [settingNav]
31 |
32 |
33 | self.window?.rootViewController = tabBar
34 | self.window?.makeKeyAndVisible()
35 | return true
36 | }
37 | }
38 |
39 | extension AppDelegate: UINavigationControllerDelegate {
40 | func navigationController(_ navigationController: UINavigationController, willShow viewController: UIViewController, animated: Bool) {
41 |
42 | }
43 |
44 | func navigationController(_ navigationController: UINavigationController, didShow viewController: UIViewController, animated: Bool) {
45 | }
46 |
47 |
48 | /*
49 | func navigationControllerSupportedInterfaceOrientations(_ navigationController: UINavigationController) -> UIInterfaceOrientationMask {
50 | print(#function)
51 | }
52 |
53 | func navigationControllerPreferredInterfaceOrientationForPresentation(_ navigationController: UINavigationController) -> UIInterfaceOrientation {
54 | print(#function)
55 | }
56 |
57 |
58 | func navigationController(_ navigationController: UINavigationController, interactionControllerFor animationController: UIViewControllerAnimatedTransitioning) -> UIViewControllerInteractiveTransitioning? {
59 | print(#function)
60 | }
61 |
62 |
63 | func navigationController(_ navigationController: UINavigationController, animationControllerFor operation: UINavigationController.Operation, from fromVC: UIViewController, to toVC: UIViewController) -> UIViewControllerAnimatedTransitioning? {
64 | print(#function)
65 | }
66 | */
67 | }
68 |
69 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/SwiftyNavigationBar_Demo/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "iphone",
5 | "size" : "20x20",
6 | "scale" : "2x"
7 | },
8 | {
9 | "idiom" : "iphone",
10 | "size" : "20x20",
11 | "scale" : "3x"
12 | },
13 | {
14 | "idiom" : "iphone",
15 | "size" : "29x29",
16 | "scale" : "2x"
17 | },
18 | {
19 | "idiom" : "iphone",
20 | "size" : "29x29",
21 | "scale" : "3x"
22 | },
23 | {
24 | "idiom" : "iphone",
25 | "size" : "40x40",
26 | "scale" : "2x"
27 | },
28 | {
29 | "idiom" : "iphone",
30 | "size" : "40x40",
31 | "scale" : "3x"
32 | },
33 | {
34 | "idiom" : "iphone",
35 | "size" : "60x60",
36 | "scale" : "2x"
37 | },
38 | {
39 | "idiom" : "iphone",
40 | "size" : "60x60",
41 | "scale" : "3x"
42 | },
43 | {
44 | "idiom" : "ios-marketing",
45 | "size" : "1024x1024",
46 | "scale" : "1x"
47 | }
48 | ],
49 | "info" : {
50 | "version" : 1,
51 | "author" : "xcode"
52 | }
53 | }
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/SwiftyNavigationBar_Demo/Assets.xcassets/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "info" : {
3 | "version" : 1,
4 | "author" : "xcode"
5 | }
6 | }
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/SwiftyNavigationBar_Demo/Assets.xcassets/ts_bg.imageset/05576479b7d850e2879e03c10e0cb83e.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wlgemini/SwiftyNavigationBar/13f6e894a99e9aa39722b4f0d6fdeb49df1e60bb/SwiftyNavigationBar_Demo/SwiftyNavigationBar_Demo/Assets.xcassets/ts_bg.imageset/05576479b7d850e2879e03c10e0cb83e.jpg
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/SwiftyNavigationBar_Demo/Assets.xcassets/ts_bg.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "05576479b7d850e2879e03c10e0cb83e.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/SwiftyNavigationBar_Demo/Assets.xcassets/ts_nb.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "c5fb17263fd0a84889bf939238cda6e7.jpg",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "scale" : "2x"
11 | },
12 | {
13 | "idiom" : "universal",
14 | "scale" : "3x"
15 | }
16 | ],
17 | "info" : {
18 | "version" : 1,
19 | "author" : "xcode"
20 | }
21 | }
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/SwiftyNavigationBar_Demo/Assets.xcassets/ts_nb.imageset/c5fb17263fd0a84889bf939238cda6e7.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wlgemini/SwiftyNavigationBar/13f6e894a99e9aa39722b4f0d6fdeb49df1e60bb/SwiftyNavigationBar_Demo/SwiftyNavigationBar_Demo/Assets.xcassets/ts_nb.imageset/c5fb17263fd0a84889bf939238cda6e7.jpg
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/SwiftyNavigationBar_Demo/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/SwiftyNavigationBar_Demo/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | $(PRODUCT_NAME)
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleVersion
20 | 1
21 | LSRequiresIPhoneOS
22 |
23 | UILaunchStoryboardName
24 | LaunchScreen
25 | UIRequiredDeviceCapabilities
26 |
27 | armv7
28 |
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 |
33 | UISupportedInterfaceOrientations~ipad
34 |
35 | UIInterfaceOrientationPortrait
36 | UIInterfaceOrientationPortraitUpsideDown
37 | UIInterfaceOrientationLandscapeLeft
38 | UIInterfaceOrientationLandscapeRight
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/SwiftyNavigationBar_Demo/MineViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // MineViewController.swift
3 | // SwiftyNavigationBar_Demo
4 | //
5 | // Created by finup on 2019/1/24.
6 | // Copyright © 2019 wlgemini. All rights reserved.
7 | //
8 |
9 | import UIKit
10 |
11 | class MineViewController: UIViewController {
12 |
13 | private var _tbvSetting: UITableView!
14 | private let _tableViewDelegate = TableViewDelegate()
15 |
16 | override func viewDidLoad() {
17 | super.viewDidLoad()
18 |
19 | self.title = "Mine"
20 |
21 | // snb custiom setting
22 | self.snb.style.backgroundAlpha = 0
23 | self.snb.style.shadowImageAlpha = 0
24 | self.snb.style.isWhiteBarStyle = true
25 | self.snb.style.tintColor = .white
26 |
27 | // rightBarButtonItem
28 | self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Push", style: .plain, target: self, action: #selector(_onPush))
29 |
30 | // _tbvSetting
31 | self._tbvSetting = UITableView(frame: self.view.bounds, style: .grouped)
32 | if #available(iOS 11.0, *) {
33 | self._tbvSetting.contentInsetAdjustmentBehavior = .never
34 | }
35 | self._tbvSetting.autoresizingMask = [.flexibleWidth, .flexibleHeight]
36 | self._tbvSetting.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: self.view.frame.height/2, right: 0)
37 | self._tbvSetting.dataSource = self._tableViewDelegate
38 | self._tbvSetting.delegate = self._tableViewDelegate
39 | self._tableViewDelegate.vc = self
40 | let iv = UIImageView(image: UIImage(named: "ts_bg"))
41 | iv.contentMode = .scaleAspectFill
42 | iv.frame.size.height = 400
43 | self._tbvSetting.tableHeaderView = iv
44 | self.view.addSubview(self._tbvSetting)
45 | }
46 |
47 | // MARK: - Action
48 | @objc private func _onPush() {
49 | self.navigationController?.pushViewController(SettingViewController(), animated: true)
50 | }
51 | }
52 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/SwiftyNavigationBar_Demo/SettingViewController.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SettingViewController.swift
3 | //
4 |
5 | import UIKit
6 |
7 |
8 | class SettingViewController: UIViewController {
9 |
10 | private var _tbvSetting: UITableView!
11 | private let _tableViewDelegate = TableViewDelegate()
12 |
13 | override func viewDidLoad() {
14 | super.viewDidLoad()
15 | self.title = "Setting"
16 |
17 | // snb custiom setting
18 | /*
19 | let backgroundEffectColor = UIColor(red: CGFloat.random(in: 0...255) / 255, green: CGFloat.random(in: 0...255) / 255, blue: CGFloat.random(in: 0...255) / 255, alpha: 1)
20 | self.snb.backgroundEffect = .color(backgroundEffectColor)
21 |
22 | let backgroundAlpha = CGFloat.random(in: 0...255) / 255
23 | self.snb.backgroundAlpha = backgroundAlpha
24 |
25 | let tintColor = UIColor(red: CGFloat.random(in: 0...255) / 255, green: CGFloat.random(in: 0...255) / 255, blue: CGFloat.random(in: 0...255) / 255, alpha: 1)
26 | self.snb.tintColor = tintColor
27 |
28 | self.snb.isWhiteBarStyle = true
29 |
30 | self.snb.shadowImageAlpha = 0.5
31 |
32 | self.snb.isHidden = true
33 | */
34 |
35 | // rightBarButtonItem
36 | self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Push", style: .plain, target: self, action: #selector(_onPush))
37 |
38 | // _tbvSetting
39 | self._tbvSetting = UITableView(frame: self.view.bounds, style: .grouped)
40 | self._tbvSetting.contentInset = UIEdgeInsets(top: 0, left: 0, bottom: self.view.frame.height/2, right: 0)
41 | self._tbvSetting.autoresizingMask = [.flexibleWidth, .flexibleHeight]
42 | self._tbvSetting.dataSource = self._tableViewDelegate
43 | self._tbvSetting.delegate = self._tableViewDelegate
44 | self._tableViewDelegate.vc = self
45 | self.view.addSubview(self._tbvSetting)
46 | }
47 |
48 | // MARK: - Action
49 | @objc private func _onPush() {
50 | let mineVC = MineViewController()
51 | mineVC.hidesBottomBarWhenPushed = true
52 | self.navigationController?.pushViewController(mineVC, animated: true)
53 | }
54 |
55 | }
56 |
--------------------------------------------------------------------------------
/SwiftyNavigationBar_Demo/SwiftyNavigationBar_Demo/TableViewDelegate.swift:
--------------------------------------------------------------------------------
1 | //
2 | // TableViewDelegate.swift
3 | // SwiftyNavigationBar_Demo
4 | //
5 | // Created by finup on 2019/1/24.
6 | // Copyright © 2019 wlgemini. All rights reserved.
7 | //
8 |
9 | import UIKit
10 | import SwiftyNavigationBar
11 |
12 | enum StyleSetting: String, CaseIterable {
13 | case backgroundEffect = "background effect"
14 | case backgroundAlpha = "background alpha"
15 | case tintColor = "tint color"
16 | case isWhiteBarStyle = "is white bar style"
17 | case shadowImageAlpha = "shadow image alpha"
18 | case alpha = "alpha"
19 | }
20 |
21 | class TableViewDelegate: NSObject {
22 |
23 | weak var vc: UIViewController?
24 | let ts_nb = UIImage(named: "ts_nb")!
25 |
26 | // MARK: - Action
27 |
28 | @objc private func _onBackgroundAlpha(sender: UISlider) {
29 | self.vc?.snb.updateStyle { (style) in
30 | style.backgroundAlpha = CGFloat(sender.value)
31 | }
32 | }
33 |
34 | @objc private func _onIsWhiteBarStyle(sender: UISwitch) {
35 | self.vc?.snb.updateStyle { (style) in
36 | style.isWhiteBarStyle = sender.isOn
37 | }
38 | }
39 |
40 | @objc private func _onShadowImageAlpha(sender: UISlider) {
41 | self.vc?.snb.updateStyle { (style) in
42 | style.shadowImageAlpha = CGFloat(sender.value)
43 | }
44 | }
45 |
46 | @objc private func _onAlpha(sender: UISlider) {
47 | self.vc?.snb.updateStyle { (style) in
48 | style.alpha = CGFloat(sender.value)
49 | }
50 | }
51 | }
52 |
53 | extension TableViewDelegate: UITableViewDataSource, UITableViewDelegate {
54 |
55 | func scrollViewDidScroll(_ scrollView: UIScrollView) {
56 | guard let tableView = scrollView as? UITableView else { return }
57 | guard let tableHeaderView = tableView.tableHeaderView else { return }
58 |
59 | let threshold = tableHeaderView.bounds.size.height
60 |
61 | let alpha = scrollView.contentOffset.y/threshold
62 | self.vc?.snb.updateStyle { (style) in
63 | style.backgroundAlpha = alpha
64 | style.shadowImageAlpha = alpha
65 | style.isWhiteBarStyle = alpha > 0.5 ? false : true
66 | style.tintColor = alpha > 0.5 ? .black : .white
67 | }
68 | }
69 |
70 | func numberOfSections(in tableView: UITableView) -> Int {
71 | return StyleSetting.allCases.count
72 | }
73 |
74 | func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
75 | let oneCase = StyleSetting.allCases[section]
76 | switch oneCase {
77 | case .backgroundEffect: // blur: 3(extraLight/light/dark), image: 3(scaleToFill/scaleAspectFit/scaleAspectFill), color: 3(white/black/gray)
78 | return 9
79 | case .backgroundAlpha: // slider: 1
80 | return 1
81 | case .tintColor: // color: 3 (white/black/gray)
82 | return 3
83 | case .isWhiteBarStyle: // switch: 1
84 | return 1
85 | case .shadowImageAlpha: // slider: 1
86 | return 1
87 | case .alpha: // slider: 1
88 | return 1
89 | }
90 | }
91 |
92 | func tableView(_ tableView: UITableView, titleForHeaderInSection section: Int) -> String? {
93 | return StyleSetting.allCases[section].rawValue
94 | }
95 |
96 | func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
97 | let cell = UITableViewCell(style: .default, reuseIdentifier: nil)
98 | let oneCase = StyleSetting.allCases[indexPath.section]
99 | let row = indexPath.row
100 |
101 | switch oneCase {
102 | case .backgroundEffect:
103 | if row == 0 {
104 | cell.textLabel?.text = "Blur: extra light"
105 | }
106 | else if row == 1 {
107 | cell.textLabel?.text = "Blur: light"
108 | }
109 | else if row == 2 {
110 | cell.textLabel?.text = "Blur: dark"
111 | }
112 | else if row == 3 {
113 | cell.textLabel?.text = "Image: scale to fill"
114 | }
115 | else if row == 4 {
116 | cell.textLabel?.text = "Image: scale aspect fit"
117 | }
118 | else if row == 5 {
119 | cell.textLabel?.text = "Image: scale aspect fill"
120 | }
121 | else if row == 6 {
122 | cell.textLabel?.text = "Color: white"
123 | }
124 | else if row == 7 {
125 | cell.textLabel?.text = "Color: black"
126 | }
127 | else if row == 8 {
128 | cell.textLabel?.text = "Color: gray"
129 | }
130 |
131 | case .backgroundAlpha:
132 | let sld = UISlider(frame: cell.contentView.bounds.insetBy(dx: 16, dy: 0))
133 | sld.value = Float(self.vc?.snb.style.backgroundAlpha ?? 1)
134 | sld.autoresizingMask = [.flexibleWidth, .flexibleHeight]
135 | sld.addTarget(self, action: #selector(_onBackgroundAlpha(sender:)), for: .valueChanged)
136 | cell.contentView.addSubview(sld)
137 |
138 | case .tintColor:
139 | if row == 0 {
140 | cell.textLabel?.text = "white"
141 | }
142 | else if row == 1 {
143 | cell.textLabel?.text = "black"
144 | }
145 | else if row == 2 {
146 | cell.textLabel?.text = "gray"
147 | }
148 |
149 | case .isWhiteBarStyle:
150 | cell.textLabel?.text = oneCase.rawValue
151 | let swt = UISwitch()
152 | swt.isOn = self.vc?.snb.style.isWhiteBarStyle ?? false
153 | swt.addTarget(self, action: #selector(_onIsWhiteBarStyle(sender:)), for: .valueChanged)
154 | cell.accessoryView = swt
155 |
156 | case .shadowImageAlpha:
157 | let sld = UISlider(frame: cell.contentView.bounds.insetBy(dx: 16, dy: 0))
158 | sld.value = Float(self.vc?.snb.style.shadowImageAlpha ?? Style.shadowImageAlpha)
159 | sld.autoresizingMask = [.flexibleWidth, .flexibleHeight]
160 | sld.addTarget(self, action: #selector(_onShadowImageAlpha(sender:)), for: .valueChanged)
161 | cell.contentView.addSubview(sld)
162 |
163 | case .alpha:
164 | let sld = UISlider(frame: cell.contentView.bounds.insetBy(dx: 16, dy: 0))
165 | sld.value = Float(self.vc?.snb.style.alpha ?? Style.alpha)
166 | sld.autoresizingMask = [.flexibleWidth, .flexibleHeight]
167 | sld.addTarget(self, action: #selector(_onAlpha(sender:)), for: .valueChanged)
168 | cell.contentView.addSubview(sld)
169 | }
170 |
171 | return cell
172 | }
173 |
174 | func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
175 | tableView.cellForRow(at: indexPath)?.isSelected = false
176 |
177 | let oneCase = StyleSetting.allCases[indexPath.section]
178 | let row = indexPath.row
179 |
180 | switch oneCase {
181 | case .backgroundEffect:
182 | if row == 0 {
183 | self.vc?.snb.updateStyle { (style) in
184 | style.backgroundEffect = .blur(.extraLight)
185 | }
186 | }
187 | else if row == 1 {
188 | self.vc?.snb.updateStyle { (style) in
189 | style.backgroundEffect = .blur(.light)
190 | }
191 | }
192 | else if row == 2 {
193 | self.vc?.snb.updateStyle { (style) in
194 | style.backgroundEffect = .blur(.dark)
195 | }
196 | }
197 | else if row == 3 {
198 | self.vc?.snb.updateStyle { (style) in
199 | style.backgroundEffect = .image(self.ts_nb, .scaleToFill)
200 | }
201 | }
202 | else if row == 4 {
203 | self.vc?.snb.updateStyle { (style) in
204 | style.backgroundEffect = .image(self.ts_nb, .scaleAspectFit)
205 | }
206 | }
207 | else if row == 5 {
208 | self.vc?.snb.updateStyle { (style) in
209 | style.backgroundEffect = .image(self.ts_nb, .scaleAspectFill)
210 | }
211 | }
212 | else if row == 6 {
213 | self.vc?.snb.updateStyle { (style) in
214 | style.backgroundEffect = .color(.white)
215 | }
216 | }
217 | else if row == 7 {
218 | self.vc?.snb.updateStyle { (style) in
219 | style.backgroundEffect = .color(.black)
220 | }
221 | }
222 | else if row == 8 {
223 | self.vc?.snb.updateStyle { (style) in
224 | style.backgroundEffect = .color(.gray)
225 | }
226 | }
227 |
228 | case .tintColor:
229 | if row == 0 {
230 | self.vc?.snb.updateStyle { (style) in
231 | style.tintColor = .white
232 | }
233 | }
234 | else if row == 1 {
235 | self.vc?.snb.updateStyle { (style) in
236 | style.tintColor = .black
237 | }
238 | }
239 | else if row == 2 {
240 | self.vc?.snb.updateStyle { (style) in
241 | style.tintColor = .gray
242 | }
243 | }
244 | default:
245 | break
246 | }
247 | }
248 | }
249 |
--------------------------------------------------------------------------------
/images/alpha.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wlgemini/SwiftyNavigationBar/13f6e894a99e9aa39722b4f0d6fdeb49df1e60bb/images/alpha.gif
--------------------------------------------------------------------------------
/images/backgroundAlpha.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wlgemini/SwiftyNavigationBar/13f6e894a99e9aa39722b4f0d6fdeb49df1e60bb/images/backgroundAlpha.gif
--------------------------------------------------------------------------------
/images/backgroundEffect.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wlgemini/SwiftyNavigationBar/13f6e894a99e9aa39722b4f0d6fdeb49df1e60bb/images/backgroundEffect.gif
--------------------------------------------------------------------------------
/images/isWhiteBarStyle.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wlgemini/SwiftyNavigationBar/13f6e894a99e9aa39722b4f0d6fdeb49df1e60bb/images/isWhiteBarStyle.gif
--------------------------------------------------------------------------------
/images/shadowImageAlpha.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wlgemini/SwiftyNavigationBar/13f6e894a99e9aa39722b4f0d6fdeb49df1e60bb/images/shadowImageAlpha.gif
--------------------------------------------------------------------------------
/images/tintColor.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wlgemini/SwiftyNavigationBar/13f6e894a99e9aa39722b4f0d6fdeb49df1e60bb/images/tintColor.gif
--------------------------------------------------------------------------------
/images/use1.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wlgemini/SwiftyNavigationBar/13f6e894a99e9aa39722b4f0d6fdeb49df1e60bb/images/use1.gif
--------------------------------------------------------------------------------
/images/use2.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/wlgemini/SwiftyNavigationBar/13f6e894a99e9aa39722b4f0d6fdeb49df1e60bb/images/use2.gif
--------------------------------------------------------------------------------