Skip to content

Commit 5f57656

Browse files
author
Dominik Hadl
committed
Fix iOS 11 issue with adding subviews to UIVisualEffectView
1 parent 8a9eb41 commit 5f57656

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Sources/InfoView.swift

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,11 @@ class InfoView: UIVisualEffectView {
6464
super.init(effect: blurEffect)
6565

6666
[label, imageView, borderView].forEach {
67-
addSubview($0)
67+
if #available(iOS 11.0, *) {
68+
contentView.addSubview($0)
69+
} else {
70+
addSubview($0)
71+
}
6872
}
6973

7074
status = Status(state: .scanning)

0 commit comments

Comments
 (0)