|
@@ -19,7 +19,7 @@ public class SwiftModalWebVC: UINavigationController {
|
|
|
public weak var delegateWeb: SwiftModalWebVCDelegate?
|
|
|
|
|
|
public enum SwiftModalWebVCTheme {
|
|
|
- case lightBlue, lightBlack, dark, customLoginWeb
|
|
|
+ case lightBlue, lightBlack, dark, loginWeb
|
|
|
}
|
|
|
|
|
|
weak var webViewDelegate: UIWebViewDelegate? = nil
|
|
@@ -32,10 +32,6 @@ public class SwiftModalWebVC: UINavigationController {
|
|
|
self.init(pageURL: URL(string: urlString)!, theme: theme)
|
|
|
}
|
|
|
|
|
|
- public convenience init(urlString: String, theme: SwiftModalWebVCTheme, color : UIColor) {
|
|
|
- self.init(pageURL: URL(string: urlString)!, theme: theme, color: color)
|
|
|
- }
|
|
|
-
|
|
|
public convenience init(pageURL: URL) {
|
|
|
self.init(request: URLRequest(url: pageURL))
|
|
|
}
|
|
@@ -44,10 +40,6 @@ public class SwiftModalWebVC: UINavigationController {
|
|
|
self.init(request: URLRequest(url: pageURL), theme: theme)
|
|
|
}
|
|
|
|
|
|
- public convenience init(pageURL: URL, theme: SwiftModalWebVCTheme, color : UIColor) {
|
|
|
- self.init(request: URLRequest(url: pageURL), theme: theme, color: color)
|
|
|
- }
|
|
|
-
|
|
|
public init(request: URLRequest, theme: SwiftModalWebVCTheme = .dark, color : UIColor = UIColor.clear) {
|
|
|
|
|
|
let webViewController = SwiftWebVC(aRequest: request)
|
|
@@ -57,7 +49,7 @@ public class SwiftModalWebVC: UINavigationController {
|
|
|
style: UIBarButtonItemStyle.plain,
|
|
|
target: webViewController,
|
|
|
action: #selector(SwiftWebVC.doneButtonTapped))
|
|
|
-
|
|
|
+
|
|
|
switch theme {
|
|
|
case .lightBlue:
|
|
|
doneButton.tintColor = nil
|
|
@@ -74,13 +66,12 @@ public class SwiftModalWebVC: UINavigationController {
|
|
|
webViewController.buttonColor = UIColor.white
|
|
|
webViewController.titleColor = UIColor.groupTableViewBackground
|
|
|
UINavigationBar.appearance().barStyle = UIBarStyle.black
|
|
|
- case .customLoginWeb:
|
|
|
+ case .loginWeb:
|
|
|
webViewController.buttonColor = UIColor.white
|
|
|
UINavigationBar.appearance().barStyle = UIBarStyle.default
|
|
|
- UINavigationBar.appearance().tintColor = color
|
|
|
}
|
|
|
|
|
|
- if (theme != .customLoginWeb) {
|
|
|
+ if (theme != .loginWeb) {
|
|
|
if (UIDevice.current.userInterfaceIdiom == UIUserInterfaceIdiom.pad) {
|
|
|
webViewController.navigationItem.leftBarButtonItem = doneButton
|
|
|
}
|