Skip to content
Eureka row that allows us to take or select a picture.
Swift Ruby Objective-C
Branch: master
Clone or download
rodriar Merge pull request #70 from EurekaCommunity/bugfix/image_going_to_lef…
…t_second_row_example

Fixed issue where the image on the second row will go to the left in …
Latest commit 3111bdd Jul 3, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.github 'Initial commit' Oct 4, 2016
Example Fixed issue where the image on the second row will go to the left in … Jul 3, 2019
ImageRow.xcodeproj Add support for Eureka 5.0+ (#62) Apr 3, 2019
ImageRow.xcworkspace release 3.1.0 May 8, 2018
Sources Allows setting a thumbnail image (#69) May 31, 2019
Tests Add support for Eureka 5.0+ (#62) Apr 3, 2019
.gitignore merge Oct 4, 2016
.swift-version Release version 4.0.0 (#66) Apr 26, 2019
.travis.yml Add support for Eureka 5.0+ (#62) Apr 3, 2019
CHANGELOG.md Release version 4.0.0 (#66) Apr 26, 2019
Cartfile Add support for Eureka 5.0+ (#62) Apr 3, 2019
Cartfile.private
Cartfile.resolved Release version 4.0.0 (#66) Apr 26, 2019
ImageRow.podspec Add support for Eureka 5.0+ (#62) Apr 3, 2019
LICENSE 3.0.0 version Oct 9, 2017
README.md Release version 4.0.0 (#66) Apr 26, 2019

README.md

Build status Platform iOS Swift 4 compatible Carthage compatible CocoaPods compatible License: MIT

By Xmartlabs SRL.

Introduction

ImageRow is a Eureka custom row that allows us to take or choose a picture.

Usage

import ImageRow
import Eureka

class ViewController: FormViewController {

    override func viewDidLoad() {
        super.viewDidLoad()


        form +++ Section()
                <<< ImageRow() { row in
                    row.title = "Image Row 1"
                    row.sourceTypes = [.PhotoLibrary, .SavedPhotosAlbum]
                    row.clearAction = .yes(style: UIAlertAction.Style.destructive)
                }
             +++
                Section()
                <<< ImageRow() {
                    $0.title = "Image Row 2"
                    $0.sourceTypes = .PhotoLibrary
                    $0.clearAction = .no
                }
                .cellUpdate { cell, row in
                    cell.accessoryView?.layer.cornerRadius = 17
                    cell.accessoryView?.frame = CGRect(x: 0, y: 0, width: 34, height: 34)
                }
             +++
                 Section()
                    <<< ImageRow() {
                        $0.title = "Image Row 3"
                        $0.sourceTypes = [.PhotoLibrary, .SavedPhotosAlbum]
                        $0.clearAction = .yes(style: .default)
                    }
    }
}

You must add the NSPhotoLibraryUsageDescription and NSCameraUsageDescription keys to your info.plist to use the Photo Library and camera. For more information, take a look at apple documentation.

Requirements

  • iOS 9.3+
  • Xcode 10.2+
  • Eureka ~> 5.0

Getting involved

  • If you want to contribute please feel free to submit pull requests.
  • If you have a feature request please open an issue.
  • If you found a bug or need help please check older issues, FAQ before submitting an issue..

Before contribute check the CONTRIBUTING file for more info.

If you use ImageRow in your app We would love to hear about it! Drop us a line on twitter.

Examples

Follow these 3 steps to run Example project: Clone ImageRow repository, run carthage update from project root folder, open ImageRow workspace and run the Example project.

You can also experiment and learn with the ImageRow Playground which is contained in ImageRow.workspace.

Installation

CocoaPods

CocoaPods is a dependency manager for Cocoa projects.

To install ImageRow, simply add the following line to your Podfile:

pod 'ImageRow', '~> 4.0'

Carthage

Carthage is a simple, decentralized dependency manager for Cocoa.

To install ImageRow, simply add the following line to your Cartfile:

github "EurekaCommunity/ImageRow" ~> 4.0

Customization

ImageRow has 5 properties to customize:

  • sourceTypes which allows us to specify the source of the picture. It could be .PhotoLibrary, .Camera, .SavedPhotosAlbum, or any combination of the previous values since sourceTypes property type is ImageRowSourceTypes which conforms to OptionSet.
  • clearAction let's us add a clear action sheet option and configure its style. Possible values are: .no or .yes(style: UIAlertActionStyle). Notice that .yes value requires we pass a UIAlertActionStyle style.
  • allowEditor tells the ImagePickerController to use the standard system image editor after a Image is selected. Possible values are: true or false. The default value for this property is false.
  • useEditedImage tells the ImageRow to use the edited Image from the editor instead of the original one. Possible values are: true or false. The default value for this property is false.
  • userPickerInfo this property holds the info properties of the ImagePickerController after a edited Image is selected, this can be used to further customization or information usage of the selected image. By default this property is nil.

To localize the Actionsheet strings just add the keys "Take photo", "Photo Library", "Saved Photos", "Cancel", "Clear Photo" to your Localizable.strings file

Author

Change Log

This can be found in the CHANGELOG.md file.

You can’t perform that action at this time.