Closed theextremeprogrammer closed 4 years ago
The reason for this is because @XuqiuyeLi and I encountered an issue while working on https://github.com/WWCodeTokyo/wwcode-tokyo-iOS-app where Succinct is finding UILabels inside of UISegmentedControls as a UISegmentLabel
object.
My current though process is that findInSubviews could maybe specify an optional list of classes to exclude when searching, but I'll play around with this a bit to see how it comes together.
Figured out a nice way to manage this just for UILabels. If it turns out that this kind of functionality is needed in other places, then at that time we can look at creating an abstraction.
Closed by the following commits:
For example: findLabel(withExactText: "Issues") returns true if there is a UISegmentedControl with a title of "Issues".
UISegmentedControls should be excluded when searching for UILabel to ensure that searching for UILabels is exclusive to UILabel. If the developer wants to search for a UISegmentedControl, then the developer should call those methods explicitly.