All Projects → opalorange → Opalimagepicker

opalorange / Opalimagepicker

Licence: mit
A multiple image picker for iOS, written in Swift

Programming Languages

swift
15916 projects

Projects that are alternatives of or similar to Opalimagepicker

Hxphotopicker
图片/视频选择器 - 支持LivePhoto、GIF图片选择、3DTouch预览、在线下载iCloud上的资源、编辑图片/视频、浏览网络图片 功能 Imitation wx photo/image picker - support for LivePhoto, GIF image selection, 3DTouch preview, Download the resources on iCloud online, browse the web image function
Stars: ✭ 2,363 (+1332.12%)
Mutual labels:  image, cocoapods, picker
Picker
Picker - A CameraX based WhatsApp Style Image-Video Picker
Stars: ✭ 69 (-58.18%)
Mutual labels:  image, picker, imagepicker
Bottomsheet Imagepicker
Modern image picker for Android
Stars: ✭ 267 (+61.82%)
Mutual labels:  image, picker, imagepicker
Assetspickerviewcontroller
Powerfully Customizable - Multiple Photo & Video Picker Controller
Stars: ✭ 321 (+94.55%)
Mutual labels:  image, picker, multiple
Louvre
A small customizable library useful to handle an gallery image pick action built-in your app. 🌄🌠
Stars: ✭ 629 (+281.21%)
Mutual labels:  image, picker
Imagepicker
📸Image Picker for Android, Pick an image from Gallery or Capture a new image with Camera
Stars: ✭ 623 (+277.58%)
Mutual labels:  image, imagepicker
Sdwebimageflplugin
A SDWebImage plugin to support GIF using FLAnimatedImage and category
Stars: ✭ 16 (-90.3%)
Mutual labels:  image, cocoapods
Sizeslidebutton
A fun Swift UIControl for picking a size
Stars: ✭ 46 (-72.12%)
Mutual labels:  cocoapods, picker
Imageviewer.swift
An easy to use Image Viewer that is inspired by Facebook
Stars: ✭ 1,071 (+549.09%)
Mutual labels:  image, cocoapods
Imageslideshow
A Swift Image SlideShow for iOS
Stars: ✭ 68 (-58.79%)
Mutual labels:  image, cocoapods
Imageselector
🌁 Android 图片选择器。充分自由定制,极大程度简化使用,支持图库多选/图片预览/单选/照片裁剪/拍照/自定义图片加载方式/自定义色调/沉浸式状态栏
Stars: ✭ 1,310 (+693.94%)
Mutual labels:  image, imagepicker
Awesomeimagepicker
Awesome Image Picker library will pick images/gifs with beautiful interface. Supports image or gif, Single and Multiple Image selection.
Stars: ✭ 160 (-3.03%)
Mutual labels:  image, imagepicker
Androidpicker
安卓选择器类库,包括日期及时间选择器(可用于出生日期、营业时间等)、单项选择器(可用于性别、民族、职业、学历、星座等)、二三级联动选择器(可用于车牌号、基金定投日期等)、城市地址选择器(分省级、地市级及区县级)、数字选择器(可用于年龄、身高、体重、温度等)、日历选日期择器(可用于酒店及机票预定日期)、颜色选择器、文件及目录选择器、图片选择器等……WheelPicker/DatePicker/TimePicker/OptionPicker/NumberPicker/LinkagePicker/AddressPicker/CarPlatePicker/CalendarPicker/ColorPicker/FilePicker/ImagePicker etc.
Stars: ✭ 5,320 (+3124.24%)
Mutual labels:  picker, imagepicker
Leetheme
优雅的主题管理库- 一行代码完成多样式切换
Stars: ✭ 762 (+361.82%)
Mutual labels:  image, cocoapods
React Native Syan Image Picker
React-Native 多图片选择 支持裁剪 压缩
Stars: ✭ 556 (+236.97%)
Mutual labels:  image, picker
Sdwebimage
Asynchronous image downloader with cache support as a UIImageView category
Stars: ✭ 23,928 (+14401.82%)
Mutual labels:  image, cocoapods
Rximagepicker
Android图片相册预览选择器、支持AndroidX,支持图片的单选、多选、图片预览、图片文件夹切换、在选择图片时调用相机拍照
Stars: ✭ 85 (-48.48%)
Mutual labels:  image, imagepicker
Datepicker
A Date Picker with Calendar for iPhone and iPad Apps.
Stars: ✭ 103 (-37.58%)
Mutual labels:  cocoapods, picker
Zoomy
Adds seamless scrollView and instagram like zooming to UIImageViews in any view hierarchy.
Stars: ✭ 130 (-21.21%)
Mutual labels:  image, cocoapods
Piximagepicker
Pix is a Whatsapp image picker replica. with this, you can integrate an image picker just like WhatsApp.
Stars: ✭ 488 (+195.76%)
Mutual labels:  picker, imagepicker

OpalImagePicker

Version License

Description

OpalImagePicker is a multiple selection Image Picker for iOS written in Swift. Meant to be a drop in replacement for UIImagePickerController. Compatible with both Swift and Objective-C.

Swift 4 and 5 Compatibility

  • Swift 5.0: >= 2.1.0 - Latest is 2.1.0 Download here.
  • Swift 4.2: >= 2.0.0 - Latest is 2.0.0 Download here.
  • Swift 4.0: >= 1.5.0 - Latest is 1.7.1 Download here. CocoaPods be sure to fix the release (pod 'OpalImagePicker', '~> 2.1.0')

Usage

OpalImagePicker is presented much like UIImagePickerController. As a normal View Controller.

let imagePicker = OpalImagePickerController()   
presentOpalImagePickerController(imagePicker, animated: true, 
	select: { (assets) in
		//Select Assets
	}, cancel: {
		//Cancel
	})

Or

let imagePicker = OpalImagePickerController()
imagePicker.imagePickerDelegate = self        
present(imagePicker, animated: true, completion: nil)

OpalImagePicker has three delegate methods to notify you when images have been selected, or the picker has been cancelled. This is only necessary if you choose not to use the presentOpalImagePickerController(_:animated:select:cancel:completion:) function.

optional func imagePicker(_ picker: OpalImagePickerController, didFinishPickingAssets assets: [PHAsset])
optional func imagePickerDidCancel(_ picker: OpalImagePickerController)

OpalImagePicker also allows you to use external images. You may want to use images from Facebook, Instagram, or Twitter for example. You can do this either using the delegate methods below or the following function in Swift presentOpalImagePickerController(_: animated: maximumSelectionsAllowed: numberOfExternalItems: externalItemsTitle: externalURLForIndex: selectAssets: selectExternalURLs: cancel: completion:) function.

optional func imagePickerNumberOfExternalItems(_ picker: OpalImagePickerController) -> Int
optional func imagePicker(_ picker: OpalImagePickerController, imageURLforExternalItemAtIndex index: Int) -> URL?    
optional func imagePickerTitleForExternalItems(_ picker: OpalImagePickerController) -> String
optional func imagePicker(_ picker: OpalImagePickerController, didFinishPickingExternalURLs urls: [URL])

OpalImagePicker supports allowing users to customize user interface features

let imagePicker = OpalImagePickerController()

//Change color of selection overlay to white
imagePicker.selectionTintColor = UIColor.white.withAlphaComponent(0.7)

//Change color of image tint to black
imagePicker.selectionImageTintColor = UIColor.black

//Change image to X rather than checkmark
imagePicker.selectionImage = UIImage(named: "x_image")

//Change status bar style
imagePicker.statusBarPreference = UIStatusBarStyle.lightContent

//Limit maximum allowed selections to 5
imagePicker.maximumSelectionsAllowed = 5

//Only allow image media type assets
imagePicker.allowedMediaTypes = Set([PHAssetMediaType.image])

//Change default localized strings displayed to the user
let configuration = OpalImagePickerConfiguration()
configuration.maximumSelectionsAllowedMessage = NSLocalizedString("You cannot select that many images!", comment: "")
imagePicker.configuration = configuration

Installation

OpalImagePicker is available through CocoaPods. To install it, simply add the following line to your Podfile:

pod 'OpalImagePicker'

Requirements

  • iOS 8.0+
  • Xcode 9.0+
  • Swift 4 to 5.0

Author

OpalOrange made this with ❤

Contribute

We would love you to contribute to OpalImagePicker

License

OpalImagePicker is available under the MIT license. See the LICENSE file for more info.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].