alqindiirsyam hace 2 años
padre
commit
4dcc1c9158

+ 0 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/Extension.swift

@@ -776,7 +776,6 @@ extension String {
                 }
                 }
             }
             }
             if isSearching {
             if isSearching {
-                let attributedText = NSMutableAttributedString(string: finalText.string) // 1
                 let range = NSString(string: finalText.string).range(of: textSearch, options: .caseInsensitive) // 2
                 let range = NSString(string: finalText.string).range(of: textSearch, options: .caseInsensitive) // 2
                 let highlightColor = UIColor.systemYellow // 3
                 let highlightColor = UIColor.systemYellow // 3
                 let highlightedAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.backgroundColor: highlightColor] // 4
                 let highlightedAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.backgroundColor: highlightColor] // 4

+ 15 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/GroupDetailViewController.swift

@@ -182,7 +182,12 @@ class GroupDetailViewController: UITableViewController {
         controller.isDismiss = {
         controller.isDismiss = {
             self.reload()
             self.reload()
         }
         }
-        navigationController?.present(UINavigationController(rootViewController: controller), animated: true, completion: nil)
+        let navController = UINavigationController(rootViewController: controller)
+        let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+        UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
+        let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
+        navController.navigationBar.titleTextAttributes = textAttributes
+        navigationController?.present(navController, animated: true)
     }
     }
     
     
     @objc func updateData(notification: NSNotification) {
     @objc func updateData(notification: NSNotification) {
@@ -323,6 +328,10 @@ class GroupDetailViewController: UITableViewController {
                     self.reload()
                     self.reload()
                 }
                 }
                 let navController = UINavigationController(rootViewController: controller)
                 let navController = UINavigationController(rootViewController: controller)
+                let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+                UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
+                let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
+                navController.navigationBar.titleTextAttributes = textAttributes
                 navigationController?.present(navController, animated: true)
                 navigationController?.present(navController, animated: true)
             } else if let g = group, isAdmin {
             } else if let g = group, isAdmin {
                 let topic = g.topics[indexPath.row - 1]
                 let topic = g.topics[indexPath.row - 1]
@@ -488,6 +497,11 @@ class GroupDetailViewController: UITableViewController {
                     self.reload()
                     self.reload()
                 }
                 }
                 let navController = UINavigationController(rootViewController: controller)
                 let navController = UINavigationController(rootViewController: controller)
+                let cancelButtonAttributes: [NSAttributedString.Key: Any] = [NSAttributedString.Key.foregroundColor: UIColor.white]
+                UIBarButtonItem.appearance().setTitleTextAttributes(cancelButtonAttributes, for: .normal)
+                let textAttributes = [NSAttributedString.Key.foregroundColor:UIColor.white]
+                navController.navigationBar.titleTextAttributes = textAttributes
+                navController.navigationBar.largeTitleTextAttributes = textAttributes
                 navigationController?.present(navController, animated: true)
                 navigationController?.present(navController, animated: true)
             } else if let g = group, isAdmin {
             } else if let g = group, isAdmin {
                 let member = g.members[indexPath.row - 1]
                 let member = g.members[indexPath.row - 1]

+ 2 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/GroupMemberViewController.swift

@@ -36,10 +36,12 @@ class GroupMemberViewController: UITableViewController {
 
 
         title = "Add New Member(s)".localized()
         title = "Add New Member(s)".localized()
         
         
+        navigationController?.navigationBar.backgroundColor = .mainColor
         navigationController?.navigationBar.prefersLargeTitles = true
         navigationController?.navigationBar.prefersLargeTitles = true
         
         
         navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(add(sender:)))
         navigationItem.rightBarButtonItem = UIBarButtonItem(barButtonSystemItem: .add, target: self, action: #selector(add(sender:)))
         navigationItem.rightBarButtonItem?.isEnabled = false
         navigationItem.rightBarButtonItem?.isEnabled = false
+        navigationItem.rightBarButtonItem?.tintColor = .white
         
         
         searchController = UISearchController(searchResultsController: nil)
         searchController = UISearchController(searchResultsController: nil)
         searchController.delegate = self
         searchController.delegate = self

+ 3 - 2
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/GroupNameViewController.swift

@@ -21,7 +21,8 @@ class GroupNameViewController: UITableViewController {
         super.viewDidLoad()
         super.viewDidLoad()
 
 
         title = "Change Group Name".localized()
         title = "Change Group Name".localized()
-
+        
+        navigationController?.navigationBar.backgroundColor = .mainColor
         navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Save".localized(), style: .plain, target: self, action: #selector(save(sender:)))
         navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Save".localized(), style: .plain, target: self, action: #selector(save(sender:)))
         navigationItem.rightBarButtonItem?.isEnabled = false
         navigationItem.rightBarButtonItem?.isEnabled = false
         
         
@@ -32,7 +33,7 @@ class GroupNameViewController: UITableViewController {
     }
     }
 
 
     @objc func didChanged(sender: Any) {
     @objc func didChanged(sender: Any) {
-        if let text = textField.text, text.trimmingCharacters(in: .whitespaces).isEmpty {
+        if let text = textField.text, text.trimmingCharacters(in: .whitespaces).isEmpty || text.lowercased() == name?.lowercased() {
             navigationItem.rightBarButtonItem?.isEnabled = false
             navigationItem.rightBarButtonItem?.isEnabled = false
         } else if let button = navigationItem.rightBarButtonItem, !button.isEnabled {
         } else if let button = navigationItem.rightBarButtonItem, !button.isEnabled {
             button.isEnabled = true
             button.isEnabled = true

+ 1 - 0
appbuilder-ios/NexilisLite/NexilisLite/Source/View/Control/GroupTopicViewController.swift

@@ -20,6 +20,7 @@ class GroupTopicViewController: UITableViewController {
         
         
         title = "Add Topic".localized()
         title = "Add Topic".localized()
 
 
+        navigationController?.navigationBar.backgroundColor = .mainColor
         navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Save".localized(), style: .plain, target: self, action: #selector(save(sender:)))
         navigationItem.rightBarButtonItem = UIBarButtonItem(title: "Save".localized(), style: .plain, target: self, action: #selector(save(sender:)))
         navigationItem.rightBarButtonItem?.isEnabled = false
         navigationItem.rightBarButtonItem?.isEnabled = false