I want to change visibility of certain layers for each page of the pageComponent. I tried using an if/else statement and currentPage, but it doesn't work. For this specific example, I want to remove a button from the screen when I swipe to the next page.
Here is my code:
if pager.currentPage != contentMySamples button.visible = false