瀏覽代碼

use only one blurview for InputbarAccessoryView (smoother blurring)

cyberta 3 年之前
父節點
當前提交
aa5973e82d
共有 2 個文件被更改,包括 1 次插入10 次删除
  1. 1 1
      deltachat-ios/Chat/Views/ChatInputBar.swift
  2. 0 9
      deltachat-ios/Chat/Views/DraftArea.swift

+ 1 - 1
deltachat-ios/Chat/Views/ChatInputBar.swift

@@ -39,7 +39,7 @@ public class ChatInputBar: InputBarAccessoryView {
         super.setup()
         super.setup()
         backgroundColor = .clear
         backgroundColor = .clear
         backgroundView.backgroundColor = DcColors.defaultTransparentBackgroundColor
         backgroundView.backgroundColor = DcColors.defaultTransparentBackgroundColor
-        backgroundView.addSubview(blurView)
+        insertSubview(blurView, at: 0)
         blurView.fillSuperview()
         blurView.fillSuperview()
     }
     }
     
     

+ 0 - 9
deltachat-ios/Chat/Views/DraftArea.swift

@@ -28,13 +28,6 @@ public class DraftArea: UIView, InputItem {
         return view
         return view
     }()
     }()
 
 
-    lazy var blurView: UIVisualEffectView = {
-        let blurEffect = UIBlurEffect(style: .light)
-        let view = UIVisualEffectView(effect: blurEffect)
-        view.translatesAutoresizingMaskIntoConstraints = false
-        return view
-    }()
-
 
 
     lazy var quotePreview: QuotePreview = {
     lazy var quotePreview: QuotePreview = {
         let view = QuotePreview()
         let view = QuotePreview()
@@ -69,10 +62,8 @@ public class DraftArea: UIView, InputItem {
     }
     }
 
 
     public func setupSubviews() {
     public func setupSubviews() {
-        addSubview(blurView)
         addSubview(mainContentView)
         addSubview(mainContentView)
         backgroundColor = DcColors.defaultTransparentBackgroundColor
         backgroundColor = DcColors.defaultTransparentBackgroundColor
-        blurView.fillSuperview()
         mainContentView.fillSuperview()
         mainContentView.fillSuperview()
     }
     }