search rounded corner view bug fix

This commit is contained in:
Chris Li 2016-10-20 15:13:06 -04:00
parent 8d594535ba
commit 1af328ca3d
3 changed files with 17 additions and 4 deletions

View File

@ -49,7 +49,7 @@
</dict>
</array>
<key>CFBundleVersion</key>
<string>1.8.1862</string>
<string>1.8.1869</string>
<key>ITSAppUsesNonExemptEncryption</key>
<false/>
<key>LSRequiresIPhoneOS</key>

View File

@ -67,8 +67,21 @@ class SearchHRegularDropShadowView: UIView {
}
class SearchRoundedCornerView: UIView {
override func awakeFromNib() {
layer.masksToBounds = true
layer.cornerRadius = 10.0
}
}
override func traitCollectionDidChange(previousTraitCollection: UITraitCollection?) {
guard traitCollection != previousTraitCollection else {return}
switch traitCollection.horizontalSizeClass {
case .Regular:
layer.cornerRadius = 10.0
case .Compact:
layer.cornerRadius = 0.0
default:
break
}
}
}

View File

@ -21,7 +21,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.8.1862</string>
<string>1.8.1869</string>
<key>NSExtension</key>
<dict>
<key>NSExtensionMainStoryboard</key>