auk


## Introduction


Auk is a lightweight and versatile image slideshow gallery for iOS apps. It allows users to easily display a collection of images in a scrollable and interactive interface. With Auk, developers can create beautiful image galleries with minimal effort.


## Features


– Supports displaying images from local file paths or remote URLs.
– Provides various configurable options for customizing the appearance and behavior of the gallery.
– Supports both vertical and horizontal scrolling orientations.
– Allows pinch-to-zoom and double-tap-to-zoom gestures for enhanced interactivity.
– Provides intuitive swipe gestures for navigating between images.
– Supports automatic and manual image scrolling.
– Enables developers to customize the pagination dots appearance.
– Provides callbacks for handling events such as image selection and scrolling animation completion.


## Requirements


– iOS 9.0+.
– Swift 4.2+.
– Xcode 10.0+.


## Installation


### CocoaPods


To integrate Auk into your Xcode project using CocoaPods, specify it in your `Podfile`:

“`plaintext
source ‘https://github.com/CocoaPods/Specs.git’
platform :ios, ‘9.0’
use_frameworks!

target ‘YourAppTarget’ do
pod ‘Auk’, ‘~> 17.0’
end
“`

Then, run the following command:

“`shell
$ pod install
“`


### Carthage


Alternatively, you can use Carthage to integrate Auk into your project. Add the following line to your `Cartfile`:

“`plaintext
github “evgenyneu/Auk” ~> 17.0
“`

Then, run the `carthage update` command and follow the integration instructions provided in the Carthage documentation.


## Usage


To use Auk in your project, follow these steps:

1. Import the `Auk` module:

“`swift
import Auk
“`

2. Create an instance of `UIScrollView` or use an existing one to host the image gallery.

3. Add image views to the scroll view by calling the `auk.numberOfPages` and `auk.setImage` methods.

“`swift
scrollView.auk.numberOfPages = 3
scrollView.auk.setImage(UIImage(named: “image1”), at: 0)
scrollView.auk.setImage(UIImage(named: “image2”), at: 1)
scrollView.auk.setImage(UIImage(named: “image3”), at: 2)
“`

4. Customize the appearance and behavior of the gallery by using various configuration options provided by Auk.

“`swift
// Configure pagination dots color
scrollView.auk.pageControl.currentPageIndicatorTintColor = UIColor.red
scrollView.auk.pageControl.pageIndicatorTintColor = UIColor.gray

// Enable tap gesture for zooming
scrollView.auk.settings.enableZoom = true

// Set the display mode for pagination dots
scrollView.auk.settings.displayMode = .always
“`

5. Handle events and perform actions by implementing the `AukDelegate` protocol.

“`swift
class MyViewController: UIViewController, AukDelegate {
override func viewDidLoad() {
super.viewDidLoad()
scrollView.auk.delegate = self
}

// Handle image selection event
func auk(_ auk: Auk, didSelectImageAtIndex index: Int) {
print(“Selected image at index \(index)”)
}

// Handle scrolling animation completion event
func aukDidScrollToPage(_ auk: Auk, page: Int) {
print(“Scrolled to page \(page)”)
}
}
“`


## Documentation


For detailed usage and API documentation, refer to the [official documentation](https://github.com/evgenyneu/Auk/wiki).


## Examples


Check out the [Auk Examples](https://github.com/evgenyneu/Auk/tree/master/AukExamples) repository for various examples and use cases of Auk implementation.


## License


Auk is available under the MIT license. See the [LICENSE](https://github.com/evgenyneu/Auk/blob/master/LICENSE) file for more info.