Skip to content

Commit

Permalink
Changes the name of the struct to ImagePicker
Browse files Browse the repository at this point in the history
  • Loading branch information
RamonGilabert authored and Ramon Gilabert Llop committed Nov 23, 2015
1 parent 45e337d commit f0acd1f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Source/BottomView/StackView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ extension ImageStackView {

for (index, view) in views.enumerate() {
if index <= photos.count - 1 {
Photos.resolveAsset(photos[index], size: CGSize(width: Dimensions.imageSize, height: Dimensions.imageSize)) { image in
ImagePicker.resolveAsset(photos[index], size: CGSize(width: Dimensions.imageSize, height: Dimensions.imageSize)) { image in
view.image = image
}
view.alpha = 1
Expand Down
4 changes: 2 additions & 2 deletions Source/ImageGallery/ImageGalleryView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ public class ImageGalleryView: UIView {
// MARK: - Photos handler

func fetchPhotos(completion: (() -> Void)? = nil) {
Photos.fetch { assets in
ImagePicker.fetch { assets in
self.assets.removeAll()
self.assets.appendContentsOf(assets)
self.collectionView.reloadData()
Expand Down Expand Up @@ -250,7 +250,7 @@ extension ImageGalleryView: UICollectionViewDelegate {

let asset = assets[indexPath.row]

Photos.resolveAsset(asset) { image in
ImagePicker.resolveAsset(asset) { image in
guard let _ = image else { return }

if cell.selectedImageView.image != nil {
Expand Down
2 changes: 1 addition & 1 deletion Source/ImageGallery/ImageGalleryViewDataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ extension ImageGalleryView: UICollectionViewDataSource {

let asset = assets[indexPath.row]

Photos.resolveAsset(asset, size: CGSize(width: 160, height: 240)) { image in
ImagePicker.resolveAsset(asset, size: CGSize(width: 160, height: 240)) { image in
if let image = image {
cell.configureCell(image)

Expand Down
4 changes: 2 additions & 2 deletions Source/ImagePickerController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ extension ImagePickerController: BottomContainerViewDelegate {
}

func doneButtonDidPress() {
let images = Photos.resolveAssets(stack.assets)
let images = ImagePicker.resolveAssets(stack.assets)
delegate?.doneButtonDidPress(images)
}

Expand All @@ -229,7 +229,7 @@ extension ImagePickerController: BottomContainerViewDelegate {
}

func imageStackViewDidPress() {
let images = Photos.resolveAssets(stack.assets)
let images = ImagePicker.resolveAssets(stack.assets)
delegate?.wrapperDidPress(images)
}
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Photos.swift
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Photos
import AssetsLibrary

public struct Photos {
public struct ImagePicker {

public static func fetch(completion: (assets: [PHAsset]) -> Void) {
let fetchOptions = PHFetchOptions()
Expand Down

0 comments on commit f0acd1f

Please sign in to comment.