|
@@ -116,7 +116,18 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
|
|
// }),
|
|
// }),
|
|
]
|
|
]
|
|
let menu = UIMenu(title: "", children: childrenMenu)
|
|
let menu = UIMenu(title: "", children: childrenMenu)
|
|
- navigationItem.rightBarButtonItem = UIBarButtonItem(image: resizeImage(image: UIImage(named: "pb_button", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, targetSize: CGSize(width: 25, height: 25)).withRenderingMode(.alwaysOriginal), primaryAction: .none, menu: menu)
|
|
|
|
|
|
+ if PrefsUtil.getIconDock() != nil {
|
|
|
|
+ DispatchQueue.global().async {
|
|
|
|
+ let data = try? Data(contentsOf: URL(string: PrefsUtil.getUrlDock()!)!) //make sure your image in this url does exist, otherwise unwrap in a if let check / try-catch
|
|
|
|
+ DispatchQueue.main.async {
|
|
|
|
+ if data != nil {
|
|
|
|
+ self.navigationItem.rightBarButtonItem = UIBarButtonItem(image: self.resizeImage(image: UIImage(data: data!)!, targetSize: CGSize(width: 25, height: 25)).withRenderingMode(.alwaysOriginal), primaryAction: .none, menu: menu)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ navigationItem.rightBarButtonItem = UIBarButtonItem(image: resizeImage(image: UIImage(named: "pb_button", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, targetSize: CGSize(width: 25, height: 25)).withRenderingMode(.alwaysOriginal), primaryAction: .none, menu: menu)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if((cpaasMode == PrefsUtil.CPAAS_MODE_DOCKED || cpaasMode == PrefsUtil.CPAAS_MODE_MIX)){
|
|
if((cpaasMode == PrefsUtil.CPAAS_MODE_DOCKED || cpaasMode == PrefsUtil.CPAAS_MODE_MIX)){
|
|
createMidFloatingButton()
|
|
createMidFloatingButton()
|
|
@@ -287,7 +298,18 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
|
|
print("buttonCenterX \(buttonCenterX)")
|
|
print("buttonCenterX \(buttonCenterX)")
|
|
print("buttonCenterY \(buttonCenterY)")
|
|
print("buttonCenterY \(buttonCenterY)")
|
|
ViewController.middleButton = UIButton(frame: CGRect(x: buttonCenterX - 50 , y: buttonCenterY - 55, width: 100, height: 100))
|
|
ViewController.middleButton = UIButton(frame: CGRect(x: buttonCenterX - 50 , y: buttonCenterY - 55, width: 100, height: 100))
|
|
- ViewController.middleButton.setBackgroundImage(UIImage(named: "pb_button", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
|
|
|
|
|
|
+ if PrefsUtil.getIconDock() != nil {
|
|
|
|
+ DispatchQueue.global().async {
|
|
|
|
+ let data = try? Data(contentsOf: URL(string: PrefsUtil.getUrlDock()!)!) //make sure your image in this url does exist, otherwise unwrap in a if let check / try-catch
|
|
|
|
+ DispatchQueue.main.async {
|
|
|
|
+ if data != nil {
|
|
|
|
+ ViewController.middleButton.setBackgroundImage(UIImage(data: data!), for: .normal)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ ViewController.middleButton.setBackgroundImage(UIImage(named: "pb_button", in: Bundle.resourceBundle(for: Nexilis.self), with: nil), for: .normal)
|
|
|
|
+ }
|
|
ViewController.middleButton.layer.shadowColor = UIColor.black.cgColor
|
|
ViewController.middleButton.layer.shadowColor = UIColor.black.cgColor
|
|
ViewController.middleButton.layer.shadowOffset = CGSize(width: 0.0, height: 2.0)
|
|
ViewController.middleButton.layer.shadowOffset = CGSize(width: 0.0, height: 2.0)
|
|
ViewController.middleButton.layer.shadowOpacity = 1.0
|
|
ViewController.middleButton.layer.shadowOpacity = 1.0
|
|
@@ -344,7 +366,18 @@ class ViewController: UITabBarController, UITabBarControllerDelegate {
|
|
childrenMenu.append(contentsOf: vc.childrenMenu)
|
|
childrenMenu.append(contentsOf: vc.childrenMenu)
|
|
}
|
|
}
|
|
let menu = UIMenu(title: "", children: childrenMenu)
|
|
let menu = UIMenu(title: "", children: childrenMenu)
|
|
- navigationItem.rightBarButtonItem = UIBarButtonItem(image: resizeImage(image: UIImage(named: "pb_button", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, targetSize: CGSize(width: 25, height: 25)).withRenderingMode(.alwaysOriginal), primaryAction: .none, menu: menu)
|
|
|
|
|
|
+ if PrefsUtil.getIconDock() != nil {
|
|
|
|
+ DispatchQueue.global().async {
|
|
|
|
+ let data = try? Data(contentsOf: URL(string: PrefsUtil.getUrlDock()!)!) //make sure your image in this url does exist, otherwise unwrap in a if let check / try-catch
|
|
|
|
+ DispatchQueue.main.async {
|
|
|
|
+ if data != nil {
|
|
|
|
+ self.navigationItem.rightBarButtonItem = UIBarButtonItem(image: self.resizeImage(image: UIImage(data: data!)!, targetSize: CGSize(width: 25, height: 25)).withRenderingMode(.alwaysOriginal), primaryAction: .none, menu: menu)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ navigationItem.rightBarButtonItem = UIBarButtonItem(image: resizeImage(image: UIImage(named: "pb_button", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)!, targetSize: CGSize(width: 25, height: 25)).withRenderingMode(.alwaysOriginal), primaryAction: .none, menu: menu)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|