Trouble in scrolling down in an iOS app

When I login into an iOS App, in the next page, I have to click on a “Next” button in the bottom of that page .
For that I have to scroll down.
I have been trying to use the below code, but it isn’t working for me:

                        Dimension dimensions = driver.manage().window().getSize();
		    Double screenHeightStart = dimensions.getHeight() * 0.5;
		    int scrollStart = screenHeightStart.intValue();
		    System.out.println("s="+scrollStart);
		    Double screenHeightEnd = dimensions.getHeight() * 0.1;
		    int scrollEnd = screenHeightEnd.intValue();
		    for (int i = 0; i < dimensions.getHeight(); i++)
                        {
		    driver.swipe(0,scrollStart,0,scrollEnd,2000);
		    if (driver.findElement(By.id("Next")).isDisplayed()) 
		    	break;
                         }

Please help me with how to tackle this problem