alqindiirsyam 1 年之前
父節點
當前提交
6e79f195de
共有 1 個文件被更改,包括 7 次插入1 次删除
  1. 7 1
      appbuilder-ios/NexilisLite/NexilisLite/Source/FloatingButton/FloatingButton.swift

+ 7 - 1
appbuilder-ios/NexilisLite/NexilisLite/Source/FloatingButton/FloatingButton.swift

@@ -101,7 +101,13 @@ public class FloatingButton: UIView {
             if !Utils.getIconDock().isEmpty && Utils.getConfigModeFB() == MODE_VERTICAL_FLOATING_BUTTON {
                 dataImage = try? Data(contentsOf: URL(string: Utils.getUrlDock()!)!)
                 if dataImage != nil {
-                    nexilis_button.image = UIImage(data: dataImage!)
+                    if let image = UIImage(data: dataImage!) {
+                        nexilis_button.image = image
+                    } else {
+                        nexilis_button.image = UIImage(named: Utils.getFBIconBg() == "1" ? "pb_button" : "pb_ball", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)
+                    }
+                } else {
+                    nexilis_button.image = UIImage(named: Utils.getFBIconBg() == "1" ? "pb_button" : "pb_ball", in: Bundle.resourceBundle(for: Nexilis.self), with: nil)
                 }
             } else {
                 if Utils.getConfigModeFB() == MODE_HORIZONTAL_SIDE_TAB {