I didn’t want a function that returned the count of elements either. I wanted to tap on a certain item in a list of unique titles if it is present.
I figured it out. I created a Set and added all of the visible titles in the list to that Set. Then I scrolled down and retrieved the next group of titles visible on the screen. If a title was not in the set, I added it and incremented a counter by 1. I repeat this scrolling and recording process until the counter equals 0 (or until the item that I want to tap is tapped), and then I know I’ve gone through all items in the list. If the items is found, it can be tapped without having to go through the whole list. If the counter equals zero, I’ve gone through the whole list without finding what I was looking for. So far, it’s working as expected for pass and fail scenarios.
Note: This probably isn’t the best solution for dealing with really long lists, but it works well within the scope of my app. Maximum “down swipes” might be 4 or 5, but it’s usually no more than two.