CCLoginWeb.swift 964 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. //
  2. // CCLoginWeb.swift
  3. // Nextcloud
  4. //
  5. // Created by Marino Faggiana on 07/04/17.
  6. // Copyright © 2017 TWS. All rights reserved.
  7. //
  8. import UIKit
  9. class CCLoginWeb: UIViewController {
  10. override func viewDidLoad() {
  11. super.viewDidLoad()
  12. }
  13. override func didReceiveMemoryWarning() {
  14. super.didReceiveMemoryWarning()
  15. }
  16. func presentModalWithDefaultTheme(_ vc: UIViewController) {
  17. let webVC = SwiftModalWebVC(urlString: k_loginBaseUrl, theme: .loginWeb)
  18. webVC.delegateWeb = self
  19. vc.present(webVC, animated: true, completion: nil)
  20. }
  21. }
  22. extension CCLoginWeb: SwiftModalWebVCDelegate {
  23. func didStartLoading() {
  24. print("Started loading.")
  25. }
  26. func didReceiveServerRedirectForProvisionalNavigation(url: URL) {
  27. print(url)
  28. }
  29. func didFinishLoading(success: Bool, url: URL) {
  30. print("Finished loading. Success: \(success).")
  31. }
  32. }