8000 Supported black list by chinghoi · Pull Request #9 · alexiscn/WXNavigationBar · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Supported black list #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading 8000
Diff view
Diff view
8000
1 change: 1 addition & 0 deletions Example/WXNavigationBarDemo/AppDelegate.swift
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate {
WXNavigationBar.setup()

WXNavigationBar.NavBar.backgroundColor = .secondarySystemBackground
WXNavigationBar.NavBar.blacklist = ["PresentViewController"]

let rootViewController = RootViewController()
window = UIWindow(frame: UIScreen.main.bounds)
Expand Down
4 changes: 4 additions & 0 deletions Sources/UIViewController+WXNavigationBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,10 @@ extension UIViewController {
if let parent = parent, !(parent is UINavigationController) && wx_automaticallyHideWXNavBarInChildViewController {
wx_navigationBar.isHidden = true
}
print(String(describing: self.classForCoder))
if WXNavigationBar.NavBar.blacklist.filter({ String(describing: self.classForCoder) == $0 }).first != nil {
wx_navigationBar.isHidden = true
}
}

wx_viewDidLoad()
Expand Down
3 changes: 3 additions & 0 deletions Sources/WXNavigationBar.swift
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ public class WXNavigationBar: UIView {

/// A Boolean value indicating whether fullscreen pop gesture is enabled.
public static var fullscreenPopGestureEnabled = false

/// In this black list, fake NavigationBar does not exist, it should be class names.
public static var blacklist: [String] = []
}

/// Bottom line
Expand Down
2 changes: 1 addition & 1 deletion WXNavigationBar.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = 'WXNavigationBar'
s.version = '2.3.6'
s.version = '2.3.7'
s.license = 'MIT'
s.requires_arc = true
s.source = { :git => 'https://github.com/alexiscn/WXNavigationBar.git', :tag => s.version.to_s }
Expand Down
0