Spinner for //XCUIElementTypeTable

I am trying to get and click the value of a spinner or dropdown with elements have //XCUIElementTypeTable[@name=‘picker_tableview’] I need to scroll down into a value

//XCUIElementTypeTable [@name=‘picker_tableview’]/XCUIElementTypeCell/XCUIElementTypeStaticText
I am tying to used this method but it not working

Dimension size = driver.manage().window().getSize();
int startx = size.getWidth() / 2;
int starty = (int) (size.getHeight() * 0.8);
int endy = (int) (size.getHeight() * 0.2);
driver.swipe(startx, starty, startx, endy, 2000);

	 TouchAction action = new TouchAction(driver);

Can someone help me?