SKPhotoBrowser alternatives and similar libraries
Based on the "UI" category.
Alternatively, view SKPhotoBrowser alternatives based on common mentions on social networks and blogs.
-
Charts
Beautiful charts for iOS/tvOS/OSX! The Apple side of the crossplatform MPAndroidChart. -
folding-cell
:octocat: 📃 FoldingCell is an expanding content cell with animation made by @Ramotion -
Material
A UI/UX framework for creating beautiful applications. -
NVActivityIndicatorView
A collection of awesome loading animations -
Animated Tab Bar
:octocat: RAMAnimatedTabBarController is a Swift UI module library for adding animation to iOS tabbar items and icons. iOS library made by @Ramotion -
FSPagerView
FSPagerView is an elegant Screen Slide Library. It is extremely helpful for making Banner View、Product Show、Welcome/Guide Pages、Screen/ViewController Sliders. -
LTMorphingLabel
[EXPERIMENTAL] Graceful morphing effects for UILabel written in Swift. -
SwiftMessages
A very flexible message bar for UIKit and SwiftUI. -
JTAppleCalendar
The Unofficial Apple iOS Swift Calendar View. Swift calendar Library. iOS calendar Control. 100% Customizable -
AMScrollingNavbar
Scrollable UINavigationBar that follows the scrolling of a UIScrollView -
SwiftEntryKit
SwiftEntryKit is a presentation library for iOS. It can be used to easily display overlays within your iOS apps. -
TextFieldEffects
Custom UITextFields effects inspired by Codrops, built using Swift -
SwipeCellKit
Swipeable UITableViewCell/UICollectionViewCell based on the stock Mail.app, implemented in Swift. -
Macaw
Powerful and easy-to-use vector graphics Swift library with SVG support -
Pagemenu
A paging menu controller built from other view controllers placed inside a scroll view (like Spotify, Windows Phone, Instagram) -
SCLAlertView
Beautiful animated Alert View. Written in Swift -
PermissionScope
A Periscope-inspired way to ask for iOS permissions. -
Scrollable-GraphView
An adaptive scrollable graph view for iOS to visualise simple discrete datasets. Written in Swift. -
Material Components for iOS
[In maintenance mode] Modular and customizable Material Design UI components for iOS -
ESTabBarController
:octocat: ESTabBarController is a Swift model for customize UI, badge and adding animation to tabbar items. Support lottie! -
SideMenu
Simple side/slide menu control for iOS, no code necessary! Lots of customization. Add it to your project in 5 minutes or less. -
Alerts Pickers
Advanced usage of UIAlertController and pickers based on it: Telegram, Contacts, Location, PhotoLibrary, Country, Phone Code, Currency, Date... -
ImagePicker
:camera: Reinventing the way ImagePicker works. -
SPPermission
Universal API for request permission and get its statuses. -
NotificationBanner
The easiest way to display highly customizable in app notification banners in iOS -
Instructions
Create walkthroughs and guided tours (coach marks) in a simple way, with Swift. -
ActiveLabel
UILabel drop-in replacement supporting Hashtags (#), Mentions (@) and URLs (http://) written in Swift -
PKHUD
A Swift based reimplementation of the Apple HUD (Volume, Ringer, Rotation,…) for iOS 8. -
PopupDialog
A simple, customizable popup dialog for iOS written in Swift. Replaces UIAlertController alert style. -
Siren
Notify users when a new version of your app is available and prompt them to upgrade. -
SlideMenuControllerSwift
iOS Slide Menu View based on Google+, iQON, Feedly, Ameba iOS app. It is written in pure swift. -
TLYShyNavBar
Unlike all those arrogant UINavigationBar, this one is shy and humble! Easily create auto-scrolling navigation bars! -
Persei
Animated top menu for UITableView / UICollectionView / UIScrollView written in Swift -
KMNavigationBarTransition
A drop-in universal library helps you to manage the navigation bar styles and makes transition animations smooth between different navigation bar styles while pushing or popping a view controller for all orientations. And you don't need to write any line of code for it, it all happens automatically. -
StarWars.iOS
This component implements transition animation to crumble view-controller into tiny pieces. -
Whisper
:mega: Whisper is a component that will make the task of display messages and in-app notifications simple. It has three different views inside -
DGElasticPullToRefresh
Elastic pull to refresh for iOS developed in Swift -
RazzleDazzle
A simple keyframe-based animation framework for iOS, written in Swift. Perfect for scrolling app intros. -
XLActionController
Fully customizable and extensible action sheet controller written in Swift -
PaperOnboarding
:octocat: PaperOnboarding is a material design UI slider. Swift UI library by @Ramotion -
DOFavoriteButton
Cute Animated Button written in Swift. -
CircleMenu
:octocat: ⭕️ CircleMenu is a simple, elegant UI menu with a circular layout and material design animations. Swift UI library made by @Ramotion
Appwrite - The open-source backend cloud platform
* Code Quality Rankings and insights are calculated and provided by Lumnify.
They vary from L1 to L5 with "L5" being the highest.
Do you think we are missing an alternative of SKPhotoBrowser or a related project?
README
SKPhotoBrowser
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
<!-- ALL-CONTRIBUTORS-BADGE:END -->
Simple PhotoBrowser/Viewer inspired by facebook, twitter photo browsers written by swift
features
- Display one or more images by providing either
UIImage
objects, or string of URL array. - Photos can be zoomed and panned, and optional captions can be displayed
- Minimalistic Facebook-like interface, swipe up/down to dismiss
- Ability to custom control. (hide/ show toolbar for controls, / swipe control)
- Handling and caching photos from web
- Landscape handling
- Delete photo support(by offbye). By set displayDelete=true show a delete icon in statusbar, deleted indexes can be obtain from delegate func didDeleted
Table/CollectionView sample | Button tap sample | gif sample |
---|---|---|
[sample](Screenshots/example01.gif) | [sample](Screenshots/example02.gif) | [sample](Screenshots/example03.gif) |
Requirements
- iOS 9.0+
- Swift 2.0+
- ARC
Version vs Swift version.
Below is a table that shows which version of SKPhotoBrowser you should use for your Swift version.
Swift version | SKPhotoBrowser version |
---|---|
5.0 | >= 6.1.0 |
4.2 | >= 6.0.0 |
4.1 | >= 5.0.0 |
3.2 | >= 4.0.0 |
2.3 | 2.0.4 - 3.1.4 |
2.2 | <= 2.0.3 |
Installation
CocoaPods
available on CocoaPods. Just add the following to your project Podfile:
pod 'SKPhotoBrowser'
use_frameworks!
Carthage
To integrate into your Xcode project using Carthage, specify it in your Cartfile:
github "suzuki-0000/SKPhotoBrowser"
Info.plist
If you want to use share image feature, it includes save image into galery, so you should specify a permission into your Info.plist (if you haven't done it yet).
<key>NSPhotoLibraryAddUsageDescription</key>
<string>Used to save images into your galery</string>
Swift Package Manager
Available in Swift Package Manager. Use the repository URL in Xcode
Usage
See the code snippet below for an example of how to implement, or see the example project.
from UIImages:
// 1. create SKPhoto Array from UIImage
var images = [SKPhoto]()
let photo = SKPhoto.photoWithImage(UIImage())// add some UIImage
images.append(photo)
// 2. create PhotoBrowser Instance, and present from your viewController.
let browser = SKPhotoBrowser(photos: images)
browser.initializePageIndex(0)
present(browser, animated: true, completion: {})
from URLs:
// 1. create URL Array
var images = [SKPhoto]()
let photo = SKPhoto.photoWithImageURL("https://placehold.jp/150x150.png")
photo.shouldCachePhotoURLImage = false // you can use image cache by true(NSCache)
images.append(photo)
// 2. create PhotoBrowser Instance, and present.
let browser = SKPhotoBrowser(photos: images)
browser.initializePageIndex(0)
present(browser, animated: true, completion: {})
from local files:
// 1. create images from local files
var images = [SKLocalPhoto]()
let photo = SKLocalPhoto.photoWithImageURL("..some_local_path/150x150.png")
images.append(photo)
// 2. create PhotoBrowser Instance, and present.
let browser = SKPhotoBrowser(photos: images)
browser.initializePageIndex(0)
present(browser, animated: true, completion: {})
If you want to use zooming effect from an existing view, use another initializer:
// e.g.: some tableView or collectionView.
func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
let cell = collectionView.cellForItemAtIndexPath(indexPath)
let originImage = cell.exampleImageView.image // some image for baseImage
let browser = SKPhotoBrowser(originImage: originImage ?? UIImage(), photos: images, animatedFromView: cell)
browser.initializePageIndex(indexPath.row)
present(browser, animated: true, completion: {})
}
Custom
Toolbar
You can customize Toolbar via SKPhotoBrowserOptions.
SKPhotoBrowserOptions.displayToolbar = false // all tool bar will be hidden
SKPhotoBrowserOptions.displayCounterLabel = false // counter label will be hidden
SKPhotoBrowserOptions.displayBackAndForwardButton = false // back / forward button will be hidden
SKPhotoBrowserOptions.displayAction = false // action button will be hidden
SKPhotoBrowserOptions.displayHorizontalScrollIndicator = false // horizontal scroll bar will be hidden
SKPhotoBrowserOptions.displayVerticalScrollIndicator = false // vertical scroll bar will be hidden
let browser = SKPhotoBrowser(originImage: originImage, photos: images, animatedFromView: cell)
Colors
You can customize text, icon and background colors via SKPhotoBrowserOptions or SKToolbarOptions
SKPhotoBrowserOptions.backgroundColor = UIColor.whiteColor() // browser view will be white
SKPhotoBrowserOptions.textAndIconColor = UIColor.blackColor() // text and icons will be black
SKToolbarOptions.textShadowColor = UIColor.clearColor() // shadow of toolbar text will be removed
SKToolbarOptions.font = UIFont(name: "Futura", size: 16.0) // font of toolbar will be 'Futura'
Images
You can customize the padding of displayed images via SKPhotoBrowserOptions
SKPhotoBrowserOptions.imagePaddingX = 50 // image padding left and right will be 25
SKPhotoBrowserOptions.imagePaddingY = 50 // image padding top and bottom will be 25
Statusbar
You can customize the visibility of the Statusbar in browser view via SKPhotoBrowserOptions
SKPhotoBrowserOptions.displayStatusbar = false // status bar will be hidden
Close And Delete Buttons
That how you can customize close and delete buttons
SKPhotoBrowserOptions.displayDeleteButton = true // delete button will be shown
SKPhotoBrowserOptions.swapCloseAndDeleteButtons = true // now close button located on right side of screen and delete button is on left side
SKPhotoBrowserOptions.closeAndDeleteButtonPadding = 20 // set offset from top and from nearest screen edge of close button and delete button
Custom Cache From Web URL
You can use SKCacheable protocol if others are adaptable. (SKImageCacheable or SKRequestResponseCacheable)
e.g. SDWebImage
// 1. create custom cache, implement in accordance with the protocol
class CustomImageCache: SKImageCacheable { var cache: SDImageCache }
// 2. replace SKCache instance with custom cache
SKCache.sharedCache.imageCache = CustomImageCache()
CustomButton Image
Close, Delete buttons are able to change image and frame.
browser.updateCloseButton(UIImage())
browser.updateUpdateButton(UIImage())
Delete Photo
You can delete your photo for your own handling. detect button tap from removePhoto
delegate function.
Photo Captions
Photo captions can be displayed simply bottom of PhotoBrowser. by setting the caption
property on specific photos:
let photo = SKPhoto.photoWithImage(UIImage())
photo.caption = "Lorem Ipsum is simply dummy text of the printing and typesetting industry."
SwipeGesture
vertical swipe can enable/disable:
SKPhotoBrowserOptions.disableVerticalSwipe = true
Delegate
There's some trigger point you can handle using delegate. those are optional. See SKPhotoBrowserDelegate for more details.
- didShowPhotoAtIndex(_ index:Int)
- willDismissAtPageIndex(_ index:Int)
- willShowActionSheet(_ photoIndex: Int)
- didDismissAtPageIndex(_ index:Int)
- didDismissActionSheetWithButtonIndex(_ buttonIndex: Int, photoIndex: Int)
- didScrollToIndex(_ index: Int)
- removePhoto(_ browser: SKPhotoBrowser, index: Int, reload: (() -> Void))
- viewForPhoto(_ browser: SKPhotoBrowser, index: Int) -> UIView?
- controlsVisibilityToggled(_ browser: SKPhotoBrowser, hidden: Bool)
let browser = SKPhotoBrowser(originImage: originImage, photos: images, animatedFromView: cell)
browser.delegate = self
// MARK: - SKPhotoBrowserDelegate
func didShowPhotoAtIndex(_ index: Int) {
// when photo will be shown
}
func willDismissAtPageIndex(_ index: Int) {
// when PhotoBrowser will be dismissed
}
func didDismissAtPageIndex(_ index: Int) {
// when PhotoBrowser did dismissed
}
Options
You can access via SKPhotoBrowserOptions
, which can use for browser control.
See SKPhotoBrowserOptions for more details.
- single tap handling, dismiss/noaction
- blackArea handling which is appearing outside of photo
- bounce animation when appearing/dismissing
- text color, font, or more
swift SKPhotoBrowserOptions.enableZoomBlackArea = true // default true SKPhotoBrowserOptions.enableSingleTapDismiss = true // default false
Photos from
License
available under the MIT license. See the LICENSE file for more info.
Contributors
Thanks goes to these wonderful people (emoji key): <!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore-start --> <!-- markdownlint-disable --> Oreo Chen💻
<!-- markdownlint-restore --> <!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --> <!-- prettier-ignore --> | Alexander Khitev💻 | K Rummler💻 | Mads Bjerre💻 | Meng Ye💻 | _ant_one💻 | Tim Roesner💻 | 胥冥💻 | | :---: | :---: | :---: | :---: | :---: | :---: | :---: | | Kevin Wolkober💻 | PJ Gray💻 | ghysrc💻 | Josef Doležal💻 | Mark Goody💻 | Philippe Riegert💻 | Bryan Irace💻 | | dirtmelon💻 | Heberti Almeida💻 | Felix Weiss💻 | .Some💻 | Onur Var💻 | Andrew Barba💻 | <!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the all-contributors specification. Contributions of any kind welcome!
*Note that all licence references and agreements mentioned in the SKPhotoBrowser README section above
are relevant to that project's source code only.