evgenyneu / Auk

An image slideshow for iOS written in Swift.
MIT License
277 stars 44 forks source link

Turn Slideshow to Full Screen on Portrait and Landscape #53

Closed bertadevant closed 7 years ago

bertadevant commented 7 years ago

Hi,

Love the library, It allows me to control each slides and that is exactly what I needed! Thanks :)

Is there a way to get the slideshow to show up on full screen if tapped?

evgenyneu commented 7 years ago

Hi @bertadevant, good question, I've never used the full screen personally, but here is a solution I found:

class ViewController: UIViewController {  
  override var prefersStatusBarHidden: Bool {
    get {
      return true;
    }
  }
}

It looks like there are other ways of doing it describe in this StackOverflow page.

auk_full_screen

Here is a demo project:

UseAuk.zip

Let me know how it works for you.

bertadevant commented 7 years ago

Thanks :)

One quick thing though, when I use scrollToPage() it goes through all the slides, one after the other until it finds the one I was asking for. Is there a way to just show that one? Without the "transition"?

evgenyneu commented 7 years ago

Yes, there is an optional animated argument. If you set it to false it will switch to the page without animation.

scrollView.auk.scrollToPage(atIndex: 2, animated: false)
evgenyneu commented 7 years ago

Closing the issue. Feel free to reopen if needed.