Jelajahi Sumber

set color webview

Marino Faggiana 6 tahun lalu
induk
melakukan
5ab18be575

+ 1 - 1
iOSClient/Brand/Intro/CCIntro.m

@@ -237,7 +237,7 @@
 {
     AppDelegate *appDelegate = (AppDelegate *)[[UIApplication sharedApplication] delegate];
     
-    SwiftModalWebVC *webVC = [[SwiftModalWebVC alloc] initWithUrlString:[NCBrandOptions sharedInstance].linkLoginHost colorText:[UIColor blackColor] doneButtonVisible:YES hideToolbar:NO];    
+    SwiftModalWebVC *webVC = [[SwiftModalWebVC alloc] initWithUrlString:[NCBrandOptions sharedInstance].linkLoginHost colorText:[UIColor whiteColor] colorDoneButton:[UIColor blackColor] doneButtonVisible:YES hideToolbar:NO];    
     webVC.delegateWeb = self;
     
     [appDelegate.window.rootViewController presentViewController:webVC animated:YES completion:nil];

+ 3 - 3
iOSClient/Library/SwiftWebVC/SwiftModalWebVC.swift

@@ -22,12 +22,12 @@ public class SwiftModalWebVC: UINavigationController {
     
     weak var webViewDelegate: UIWebViewDelegate? = nil
     
-    @objc public convenience init(urlString: String, colorText: UIColor, doneButtonVisible: Bool, hideToolbar: Bool = false) {
+    @objc public convenience init(urlString: String, colorText: UIColor, colorDoneButton: UIColor, doneButtonVisible: Bool, hideToolbar: Bool = false) {
         let url = URL(string: urlString)!
-        self.init(request: URLRequest(url: url), colorText: colorText, doneButtonVisible: doneButtonVisible, hideToolbar: hideToolbar)
+        self.init(request: URLRequest(url: url), colorText: colorText, colorDoneButton: colorDoneButton, doneButtonVisible: doneButtonVisible, hideToolbar: hideToolbar)
     }
     
-    public init(request: URLRequest, colorText: UIColor = UIColor.black, doneButtonVisible: Bool = false, hideToolbar: Bool = false) {
+    public init(request: URLRequest, colorText: UIColor = UIColor.white, colorDoneButton: UIColor = UIColor.black, doneButtonVisible: Bool = false, hideToolbar: Bool = false) {
         
         let webViewController = SwiftWebVC(aRequest: request, hideToolbar: hideToolbar)
         webViewController.storedStatusColor = UINavigationBar.appearance().barStyle

+ 1 - 1
iOSClient/Login/CCLoginWeb.swift

@@ -47,7 +47,7 @@ public class CCLoginWeb: UIViewController {
             urlString =  urlBase+k_flowEndpoint
         }
         
-        let webVC = SwiftModalWebVC(urlString: urlString, colorText: NCBrandColor.sharedInstance.nextcloud, doneButtonVisible: true, hideToolbar: true)
+        let webVC = SwiftModalWebVC(urlString: urlString, colorText: NCBrandColor.sharedInstance.nextcloud, colorDoneButton: NCBrandColor.sharedInstance.customerText, doneButtonVisible: true, hideToolbar: true)
         webVC.delegateWeb = self
 
         vc.present(webVC, animated: false, completion: nil)

+ 2 - 2
iOSClient/Main/CCMore.swift

@@ -408,7 +408,7 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource, CCLo
                 
             } else {
                 
-                let webVC = SwiftModalWebVC(urlString: item.url, colorText: UIColor.white, doneButtonVisible: true)
+                let webVC = SwiftModalWebVC(urlString: item.url, colorText: UIColor.white, colorDoneButton: UIColor.black, doneButtonVisible: true)
                 webVC.delegateWeb = self
                 self.present(webVC, animated: true, completion: nil)
             }
@@ -450,7 +450,7 @@ class CCMore: UIViewController, UITableViewDelegate, UITableViewDataSource, CCLo
                 
             } else {
                 
-                let webVC = SwiftModalWebVC(urlString: item.url, colorText: UIColor.black, doneButtonVisible: true, hideToolbar: false)
+                let webVC = SwiftModalWebVC(urlString: item.url, colorText: UIColor.white, colorDoneButton: UIColor.black, doneButtonVisible: true, hideToolbar: false)
                 webVC.delegateWeb = self
                 self.present(webVC, animated: true, completion: nil)
             }