SDSelectorView aims to improve applications aesthetics by providing a horizontal scroll and easy-to-implement image gallery.
SDSelectorView is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'SDSelectorView'
or just copy and paste SDPresentationView.swift and SDSelectorView.swift files.
SDSelectorView just need a couple of lines to be used. Add a view in you storyboard and make it be a subclass of SDSelectorView
@IBOutlet weak var mySelectorView: SDSelectorView!
Add the line below to configure the selector gallery.
self.mySelectorView.configSDSelectorWith(imageSize: , spacedBy: , withImages: <[UIImage]>)
And you have delegate methods to help you when user interacts with your gallery. Add SDSelectorViewDelegate to your class and the lines below.
self.mySelectorView.SDdelegate = self
// MARK: Delegate methods
func didCangedIndex(index: Int) {
}
func didSelectView(index: Int) {
}
danieldias25, daniel.dias.e@gmail.com
SDSelectorView is available under the MIT license. See the LICENSE file for more info.