AdaSupport / ios-sdk

EmbedFramework is a small iOS SDK that is used to embed the Ada Chat bot into native iOS applications.
MIT License
4 stars 21 forks source link

Navigation bar background is transparent #51

Open ailynempower opened 2 years ago

ailynempower commented 2 years ago

When using launchModalWebSupport, the Done button has a transparent background. This leads to an undesirable UI, where the Ada chatbot's done button overlaps whatever is in the presenting view.

Could you please add navigationController.navigationBar.background = UIColor.white? In version 1.4.2, this is in AdaWebHostViewController.swift, func createNavController

Here is the patch to fix it (as of 1.4.2)

diff --git a/EmbedFramework/AdaWebHostViewController.swift b/EmbedFramework/AdaWebHostViewController.swift
index 460f7f0..daa2e96 100644
--- a/EmbedFramework/AdaWebHostViewController.swift
+++ b/EmbedFramework/AdaWebHostViewController.swift
@@ -33,6 +33,7 @@ class AdaWebHostViewController: UIViewController {
     static func createNavController(with webView: WKWebView) -> UINavigationController {
         let adaWebHostController = createWebController(with: webView)
         let navController = UINavigationController(rootViewController: adaWebHostController)
+        navController.navigationBar.backgroundColor = UIColor.white

         let doneBarButtonItem = UIBarButtonItem(barButtonSystemItem: .done, target: adaWebHostController, action: #selector(doneButtonTapped(_:)))
         adaWebHostController.navigationItem.setLeftBarButton(doneBarButtonItem, animated: false)
lujcheng commented 2 years ago

Hi @ailynempower, thanks for bringing this to our attention. We're looking into this issue

ailynempower commented 2 years ago

Exciting, looking forward to the fix in 1.4.3 😄 🤞🤞

mccarron commented 2 years ago

Hopefully this gets fixed soon, I reported it to our Ada reps back in March along with another proposed fix and no progress as of yet.

It looks horrible and our users are so confused on how to exit Ada.