Used isDisplayed- worked....used Visibilityof element in wait- did not work in iOS(getting tired of Appium issues now)

boolean check=true;
while(check)
{
try {
placeDistanceHotels.getAttribute(“visible”).equals(“true”);
topHotelsHeader.isDisplayed();
check=false;
}catch(Exception e)
{
comlib.swipe_ins(driver, “up”);
}
}
comlib.validateForElementDisplayed(placeDistanceHotels, driver, extest, “verify if Top Hotels is displayed”, “”,
“”, “Top Hotels is not displayed”);

public boolean validateForElementDisplayed(WebElement element,AppiumDriver driver,ExtentTest test, String stepDesc, String inputValue, String expectedValue, String actValue) throws Exception
{

	boolean check=false;

	try{
		Wait  fw= new FluentWait(driver).withTimeout(20,TimeUnit.SECONDS).pollingEvery(2,TimeUnit.SECONDS).ignoring(Exception.class);
		fw.until(ExpectedConditions.visibilityOf(element));
		passNew(stepDesc, inputValue, expectedValue, test);
		check=true;


	}
	catch (Exception e) {

		check= false;
		System.out.println(stepDesc+"fail");

		failNew(driver, stepDesc, inputValue, actValue, test);
	}
	return check;
}

Appium- 1.8.0
iOS- 11.2.1