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 b564031 commit c0acbdbCopy full SHA for c0acbdb
StackScrollView/StackScrollViewCellType.swift
@@ -29,7 +29,12 @@ public protocol StackScrollViewCellType: class {
29
extension StackScrollViewCellType where Self: UIView {
30
31
public var stackScrollView: StackScrollView {
32
- let superview = self.superview?.superview?.superview
+ var superview: UIView? = self
33
+
34
+ while !(superview is StackScrollView) {
35
+ superview = superview?.superview
36
+ }
37
38
precondition(superview is StackScrollView, "Must be added StackScrollView")
39
return superview as! StackScrollView
40
}
0 commit comments