Created
January 2, 2019 21:24
-
-
Save regnerjr/18c11cfbff4e423cec3b4cf0bf7b0ece to your computer and use it in GitHub Desktop.
Exercise Ambiguous Views in Swift
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
+#if DEBUG | |
+extension UIView { | |
+ @available(*, deprecated, message: "This warning is here so you don't ship this code") | |
+ @objc func exerciseAmbiguityInLayoutRepeatedly() { | |
+ if self.hasAmbiguousLayout { | |
+ Timer.scheduledTimer(timeInterval: 0.5, | |
+ target: self, | |
+ selector: #selector(UIView.exerciseAmbiguityInLayout), | |
+ userInfo: nil, | |
+ repeats: true) | |
+ } | |
+ } | |
+} | |
+#endif |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment