evgenyneu / Auk

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

Page control is not visible #34

Closed ohorbach closed 8 years ago

ohorbach commented 8 years ago

Hi, page control is not visible if I'm setting images in viewDidLoad or viewWillAppear method.

evgenyneu commented 8 years ago

Hi, @ohorbach, thanks for reporting. This is a common problem that other people faced before. I have added the following note about it in the readme.

Make sure the scrollView is added to the view tree before you call the show method. Otherwise the page control will not be created. Quick check:

print(scrollView.superview) // should not be `nil`
scrollView.auk.show(url: "http://site.com/bird.jpg")

The page control is added to the superview of the scroll view when the show method is called. If scrollview has no superview the page control will not be added.

evgenyneu commented 8 years ago

If scrollView.superview is nil then you may need to move that code that shows the images to the viewDidAppear method.

evgenyneu commented 8 years ago

Hi @ohorbach, is this issue solved?

evgenyneu commented 8 years ago

Closing the issue, feel free to reopen when needed.