|
@@ -465,7 +465,10 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
|
|
|
|
|
|
func showWelocomeView() {
|
|
func showWelocomeView() {
|
|
if let viewWelcome = welcomeVC.view {
|
|
if let viewWelcome = welcomeVC.view {
|
|
- viewWelcome.backgroundColor = .white
|
|
|
|
|
|
+ let bgImage = UIImageView()
|
|
|
|
+ viewWelcome.addSubview(bgImage)
|
|
|
|
+ bgImage.anchor(top: viewWelcome.topAnchor, left: viewWelcome.leftAnchor, bottom: viewWelcome.bottomAnchor, right: viewWelcome.rightAnchor)
|
|
|
|
+ bgImage.backgroundColor = .white
|
|
DispatchQueue.global().async {
|
|
DispatchQueue.global().async {
|
|
if let listBg = PrefsUtil.getBackground() {
|
|
if let listBg = PrefsUtil.getBackground() {
|
|
if listBg.isEmpty {
|
|
if listBg.isEmpty {
|
|
@@ -478,7 +481,7 @@ class ViewController: UITabBarController, UITabBarControllerDelegate, SettingMAB
|
|
guard let data = data, error == nil else { return }
|
|
guard let data = data, error == nil else { return }
|
|
// always update the UI from the main thread
|
|
// always update the UI from the main thread
|
|
DispatchQueue.main.async() {
|
|
DispatchQueue.main.async() {
|
|
- viewWelcome.backgroundColor = UIColor(patternImage: UIImage(data: data)!)
|
|
|
|
|
|
+ bgImage.image = UIImage(data: data)!
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|