How to swipe down/up on iOS

Hi,

I am having issues swiping up or down on iOS. This is the code which is working perfectly for Android:

Dimension size = driver.manage().window().getSize();
System.out.println(“DEBUG *******************” + size.width + “");
System.out.println(“DEBUG *******************” + size.height + "
”);
int anchor = (int) (size.width * 0.6);
int startPoint = (int) (size.height * 0.8);
int endPoint = (int) (size.height * 0.2);
System.out.println(“DEBUG *******************” + anchor + “");
System.out.println(“DEBUG *******************” + startPoint + "
”);
System.out.println(“DEBUG *******************” + endPoint + “***********************”);

        new TouchAction(driver)
                .press(PointOption.point(anchor, startPoint))
                .waitAction(waitOptions(ofMillis(1000)))
                .moveTo(PointOption.point(anchor, endPoint))
                .release()
                .perform();

I am using Appium version 1.10 and java-client:7.0.0. Any help or pointing in the right direction would be appreciated.

Thanks!