Skip to content

Instantly share code, notes, and snippets.

@jmoody
Last active January 2, 2016 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jmoody/8337047 to your computer and use it in GitHub Desktop.
Save jmoody/8337047 to your computer and use it in GitHub Desktop.
def non_location_items
all_items = query("view:'MKAnnotationView'")
location_items = query("view:'MKModernUserLocationView'")
all_items.delete_if { |item| location_items.include?(item) }
end
def touch_first_non_location
desc = non_location_items.first['description'].split(';').first
touch("view:'MKAnnotationView' {description BEGINSWITH '#{desc}'}")
sleep(0.4)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment