Skip to content

Commit

Permalink
[Pod release] returned assets
Browse files Browse the repository at this point in the history
  • Loading branch information
mozharovsky committed Jan 17, 2017
1 parent f31104b commit e5d3560
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 23 deletions.
2 changes: 1 addition & 1 deletion ATHKit.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|

s.name = "ATHKit"
s.version = "0.0.9.2"
s.version = "0.0.9.3"
s.summary = "ATHKit is a collection of customizable UI components such as ImagePickerController and more."
s.homepage = "https://github.com/Athlee/ATHKit"
s.license = { :type => "MIT", :file => "LICENSE" }
Expand Down
50 changes: 28 additions & 22 deletions Source/ATHImagePickerController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ extension StatusBarUpdatable where Self: UIViewController, Self.Config == ATHIma
}
}

internal final class ATHImagePickerStatusBarAppearance {
internal var config = ATHImagePickerStatusBarConfig()

internal let shared = ATHImagePickerStatusBarAppearance()

private init() { }
}

//
// MARK: - `ATHImagePickerController` public components
//
Expand Down Expand Up @@ -72,22 +80,22 @@ public protocol ATHImagePickerControllerDelegate: class {
func imagePickerController(_ picker: ATHImagePickerController, configFor sourceType: ATHImagePickerSourceType) -> ATHImagePickerPageConfig
}

//public struct ATHImagePickerAssets {
// public let switchCameraIcon: UIImage?
// public let flashOnImage: UIImage?
// public let flashOffImage: UIImage?
// public let flashAutoImage: UIImage?
//
// public init(switchCameraIcon: UIImage? = nil,
// flashOnImage: UIImage? = nil,
// flashOffImage: UIImage? = nil,
// flashAutoImage: UIImage? = nil) {
// self.switchCameraIcon = switchCameraIcon
// self.flashOnImage = flashOnImage
// self.flashOffImage = flashOffImage
// self.flashAutoImage = flashAutoImage
// }
//}
public struct ATHImagePickerAssets {
public let switchCameraIcon: UIImage?
public let flashOnImage: UIImage?
public let flashOffImage: UIImage?
public let flashAutoImage: UIImage?

public init(switchCameraIcon: UIImage? = nil,
flashOnImage: UIImage? = nil,
flashOffImage: UIImage? = nil,
flashAutoImage: UIImage? = nil) {
self.switchCameraIcon = switchCameraIcon
self.flashOnImage = flashOnImage
self.flashOffImage = flashOffImage
self.flashAutoImage = flashAutoImage
}
}

public struct ATHImagePickerPageConfig {
public let leftButtonTitle: String
Expand All @@ -103,7 +111,7 @@ public struct ATHImagePickerPageConfig {
public let isStatusBarHidden: Bool
public let statusBarAnimation: UIStatusBarAnimation

//public let assets: ATHImagePickerAssets?
public let assets: ATHImagePickerAssets?

public init(leftButtonTitle: String,
rightButtonTitle: String,
Expand All @@ -115,8 +123,8 @@ public struct ATHImagePickerPageConfig {
leftButtonColor: UIColor,
rightButtonColor: UIColor,
isStatusBarHidden: Bool = false,
statusBarAnimation: UIStatusBarAnimation = .none
/*assets: ATHImagePickerAssets? = nil*/) {
statusBarAnimation: UIStatusBarAnimation = .none,
assets: ATHImagePickerAssets? = nil) {
self.leftButtonTitle = leftButtonTitle
self.rightButtonTitle = rightButtonTitle
self.leftButtonImage = leftButtonImage
Expand All @@ -130,7 +138,7 @@ public struct ATHImagePickerPageConfig {
self.isStatusBarHidden = isStatusBarHidden
self.statusBarAnimation = statusBarAnimation

//self.assets = assets
self.assets = assets
}
}

Expand All @@ -151,8 +159,6 @@ open class ATHImagePickerController: UINavigationController, ATHImagePickerCommi
open var sourceType: ATHImagePickerSourceType = [.camera]
open weak var pickerDelegate: ATHImagePickerControllerDelegate?

//open static var statusBarConfig = ATHImagePickerStatusBarConfig()

// MARK: - Life cycle

override open func viewDidLoad() {
Expand Down

0 comments on commit e5d3560

Please sign in to comment.