We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 05f5c9f commit e036144Copy full SHA for e036144
bk2ch28AppendixB/bk2ch40AppendixB/ViewController.swift
@@ -174,7 +174,7 @@ extension UIView {
174
}
175
176
177
-// utility for shortening constraint creation
+// utility for shortening constraint creation, not in book
178
// I'm not big on this kind of thing, but this is so common it seems to need something
179
180
extension UIView {
@@ -188,6 +188,13 @@ extension UIView {
188
189
190
191
+// reverse of `contains`, not in book, but I'd much rather talk this way:
192
+
193
+extension Equatable {
194
+ func isMember<T>(of coll:T) -> Bool where T:Collection, T.Element == Self {
195
+ return coll.contains(self)
196
+ }
197
+}
198
199
200
extension UIControl {
0 commit comments