OnlyPictures alternatives and similar libraries
Based on the "Image" category.
Alternatively, view OnlyPictures alternatives based on common mentions on social networks and blogs.
-
SDWebImage
Asynchronous image downloader with cache support as a UIImageView category -
GPU Image
An open source iOS framework for GPU-based image and video processing -
Kingfisher
A lightweight, pure-Swift library for downloading and caching images from the web. -
MWPhotoBrowser
A simple iOS photo and video browser with grid view, captions and selections. -
FastImageCache
iOS library for quickly displaying images while scrolling -
GPUImage2
GPUImage 2 is a BSD-licensed Swift framework for GPU-accelerated video and image processing. -
TOCropViewController
A view controller for iOS that allows users to crop portions of UIImage objects -
AlamofireImage
AlamofireImage is an image component library for Alamofire -
PINRemoteImage
A thread safe, performant, feature rich image fetcher -
IDMPhotoBrowser
Photo Browser / Viewer inspired by Facebook's and Tweetbot's with ARC support, swipe-to-dismiss, image progress and more -
SKPhotoBrowser
Simple PhotoBrowser/Viewer inspired by facebook, twitter photo browsers written by swift -
AspectFillFaceAware
An extension that gives UIImageView the ability to focus on faces within an image. -
UIImageColors
Fetches the most dominant and prominent colors from an image. -
RSKImageCropper
An image cropper / photo cropper for iOS like in the Contacts app with support for landscape orientation. -
GPUImage3
GPUImage 3 is a BSD-licensed Swift framework for GPU-accelerated video and image processing using Metal. -
ImageSlideshow
Swift image slideshow with circular scrolling, timer and full screen viewer -
TLPhotoPicker
📷 multiple phassets picker for iOS lib. like a facebook -
TinyCrayon
A smart and easy-to-use image masking and cutout SDK for mobile apps. -
EBPhotoPages
A photo gallery for iOS with a modern feature set. Similar features as the Facebook photo browser. -
Lightbox
:milky_way: A convenient and easy to use image viewer for your iOS app -
MetalPetal
A GPU accelerated image and video processing framework built on Metal. -
Twitter Image Pipline
Twitter Image Pipeline is a robust and performant image loading and caching framework for iOS clients -
ImagePickerSheetController
ImagePickerSheetController replicates the custom photo action sheet in iMessage. -
Sharaku
(Not maintained)Image filtering UI library like Instagram. -
YUCIHighPassSkinSmoothing
An implementation of High Pass Skin Smoothing using Apple's Core Image Framework -
DFImageManager
Image loading, processing, caching and preheating -
SFSafeSymbols
Safely access Apple's SF Symbols using static typing -
CTPanoramaView
A library that displays spherical or cylindrical panoramas with touch or motion based controls. -
ImageScout
A Swift implementation of fastimage. Supports PNG, GIF, and JPEG. -
Paparazzo
Custom iOS camera and photo picker with editing capabilities -
ShadowImageView
A apple music cover picture shadow style image library -
AXPhotoViewer
An iOS/tvOS photo gallery viewer, useful for viewing a large (or small!) number of photos. -
ComplimentaryGradientView
Create complementary gradients generated from dominant and prominent colors in supplied image. Inspired by Grade.js -
SimpleImageViewer
A snappy image viewer with zoom and interactive dismissal transition. -
Viewer
Image viewer (or Lightbox) with support for local and remote videos and images -
SABlurImageView
You can use blur effect and it's animation easily to call only two methods.
Appwrite - The Open Source Firebase alternative introduces iOS support
* 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 OnlyPictures or a related project?
README
THIS PROJECT IS NO LONGER MAINTAINED. STILL ONE ONLY BEST UI SOLUTION FOR UIKIT DEVELOPERS.
SOON WILL COME UP WITH SWIFTUI
Installation
OnlyPictures is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod 'OnlyPictures'
Explaination & Live tracker.
onlyPictures.order = .descending
Usage
Add UIView
in your outlet, select it and go to Properties -> Identity Inspector
, add OnlyHorizontalPictures
in class property
. OnlyVerticalPictures
about to release soon.
->
Create instance
of this outlet as below.
@IBOutlet weak var onlyPictures: OnlyHorizontalPictures!
Use DataSource
for data assignment & Delegate
to get indication of action performed in pictures.
onlyPictures.dataSource = self
onlyPictures.delegate = self
DataSource Methods
extension ViewController: OnlyPicturesDataSource {
// ---------------------------------------------------
// returns the total no of pictures
func numberOfPictures() -> Int {
return pictures.count
}
// ---------------------------------------------------
// returns the no of pictures should be visible in screen.
// In above preview, Left & Right formats are example of visible pictures, if you want pictures to be shown without count, remove this function, it's optional.
func visiblePictures() -> Int {
return 6
}
// ---------------------------------------------------
// return the images you want to show. If you have URL's for images, use next function instead of this.
// use .defaultPicture property to set placeholder image. This only work with local images. for URL's images we provided imageView instance, it's your responsibility to assign placeholder image in it. Check next function.
// onlyPictures.defaultPicture = #imageLiteral(resourceName: "defaultProfilePicture")
func pictureViews(index: Int) -> UIImage {
return pictures[index]
}
// ---------------------------------------------------
// If you do have URLs of images. Use below function to have UIImageView instance and index insted of 'pictureViews(index: Int) -> UIImage'
// NOTE: It's your resposibility to assign any placeholder image till download & assignment completes.
// I've used AlamofireImage here for image async downloading, assigning & caching, Use any library to allocate your image from url to imageView.
func pictureViews(_ imageView: UIImageView, index: Int) {
// Use 'index' to receive specific url from your collection. It's similar to indexPath.row in UITableView.
let url = URL(string: self.pictures[index])
imageView.image = #imageLiteral(resourceName: "defaultProfilePicture") // placeholder image
imageView.af_setImage(withURL: url!)
}
}
Delegate Methods
extension ViewController: OnlyPicturesDelegate {
// ---------------------------------------------------
// receive an action of selected picture tap index
func pictureView(_ imageView: UIImageView, didSelectAt index: Int) {
}
// ---------------------------------------------------
// receive an action of tap upon count
func pictureViewCountDidSelect() {
}
// ---------------------------------------------------
// receive a count, incase you want to do additionally things with it.
// even if your requirement is to hide count and handle it externally with below fuction, you can hide it using property `isVisibleCount = true`.
func pictureViewCount(value: Int) {
print("count value: \(value)")
}
// ---------------------------------------------------
// receive an action, whem tap occures anywhere in OnlyPicture view.
func pictureViewDidSelect() {
}
}
Reload
.reloadData()
reloadData()
will work similar toUITableView -> reloadData()
, it will callnumberOfPictures()
&pictureViews(index: Int)
/pictureViews(_ imageView: UIImageView, index: Int)
again to reform pictures.
Properties
.order
- Pictures works based on
LIFO
- Last In First Out, means last added will be shown at top (recent). - If your array contains pictures in
ascending
, it will show last picture OR in other words last appended picture at top (recent). - If your array contains pictures in
descending
, set.order property
to.descending
to show first picture at top (recent).
.ascending
.descending
onlyPictures.order = .descending
.recentAt
.left
.right
onlyPictures.recentAt = .left
.alignment
.left
.center
.right
onlyPictures.alignment = .left
.countPosition
.right
.left
onlyPictures.countPosition = .right
.gap
.gap = 20
.gap = 36
.gap = 50
onlyPictures.gap = 36
.spacing
.spacing = 0
.spacing = 2
.spacing = 4
.spacing = 4
onlyPictures.spacing = 2
.spacingColor
.spacingColor = .gray
.spacingColor = .white
onlyPictures.spacingColor = UIColor.white
.imageInPlaceOfCount
- Set image in place of count. If this property set, count properties won't effect.
onlyPictures.imageInPlaceOfCount = UIImage(named:"image_name")
Properties for count
.backgroundColorForCount
onlyPictures.backgroundColorForCount = .orange
.textColorForCount
onlyPictures.textColorForCount = .red
.fontForCount
onlyPictures.fontForCount = UIFont(name: "HelveticaNeue", size: 18)!
.isHiddenVisibleCount
- To hide count, set
.isHiddenVisibleCount = true
. But you can receive count in a following funtion ofOnlyPicturesDelegate
-pictureViewCount(value: Int)
.swift onlyPictures.isHiddenVisibleCount = true
Things you can do additionally, Insert & Remove at First/Last/Specific-Position
- NOTE: it's your responsibility to insert/remove image in your collection too, you used for pictures. It's similar pattern you follows using UITableView.
Insert first in .order = .descending
onlyPictures.insertFirst(image: UIImage(named: "p11"), withAnimation: .popup)
Insert last in .order = .descending
onlyPictures.insertLast(image: UIImage(named: "p12"), withAnimation: .popup)
Insert at specific position in .order = .descending
, below added at 2nd position
onlyPictures.insertPicture(UIImage(named: "p12"), atIndex: 2, withAnimation: .popup)
Remove first in .order = .descending
onlyPictures.removeFirst(withAnimation: .popdown)
Remove last in .order = .descending
onlyPictures.removeLast(withAnimation: .popdown)
Remove from specific position in .order = .descending
, below removed from 2nd position
onlyPictures.removePicture(atIndex: 2, withAnimation: .popdown)
Let's check how insertion works with dynamic images. remove is same as above.
Insert first in .order = .descending
let url = URL(string: "http://insightstobehavior.com/wp-content/uploads/2017/08/testi-5.jpg")
onlyPictures.insertFirst(withAnimation: .popup) { (imageView) in
imageView.image = #imageLiteral(resourceName: "defaultProfilePicture")
imageView.af_setImage(withURL: url!)
}
Insert last in .order = .descending
let url = URL(string: "http://insightstobehavior.com/wp-content/uploads/2017/08/testi-5.jpg")
onlyPictures.insertLast(withAnimation: .popup) { (imageView) in
imageView.image = #imageLiteral(resourceName: "defaultProfilePicture")
imageView.af_setImage(withURL: url!)
}
Insert at specific position in .order = .descending
, below added at 2nd position
let url = URL(string: "http://insightstobehavior.com/wp-content/uploads/2017/08/testi-5.jpg")
onlyPictures.insertPicture(atIndex: 2, withAnimation: .popup) { (imageView) in
imageView.image = #imageLiteral(resourceName: "defaultProfilePicture")
imageView.af_setImage(withURL: url!)
}
Author
Kiran Jasvanee,
Skype - kiranjasvanee
LinkedIn - https://www.linkedin.com/in/kiran-jasvanee-ab363778
eMail - [email protected]
License
OnlyPictures is available under the MIT license. See the LICENSE file for more info.
*Note that all licence references and agreements mentioned in the OnlyPictures README section above
are relevant to that project's source code only.