Skip to content

Commit

Permalink
Added new images
Browse files Browse the repository at this point in the history
  • Loading branch information
RamonGilabert committed Aug 5, 2015
1 parent 77dd042 commit b957edd
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Demo/ImagePickerDemo/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ EXTERNAL SOURCES:
:path: ../../

SPEC CHECKSUMS:
ImagePicker: 1ed5022e28822e85d18c5de7e68bb56851c8bd7a
ImagePicker: 32becfa25b8e9179e60c45411b577340d35e3e32

COCOAPODS: 0.37.2
3 changes: 2 additions & 1 deletion ImagePicker.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Pod::Spec.new do |s|
s.platform = :ios, '8.0'
s.requires_arc = true
s.source_files = 'Source/**/*'
# s.frameworks = 'UIKit', 'MapKit'
s.resource_bundles = { 'ImagePicker' => ['Images/*.{png}'] }
s.frameworks = 'AVFoundation'
# s.dependency 'AFNetworking', '~> 2.3'
end
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
15 changes: 11 additions & 4 deletions Source/TopView/TopView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,27 @@ class TopView: UIView {

lazy var flashButton: UIButton = {
let button = UIButton()
let file = NSBundle.mainBundle().pathForResource("flashIcon", ofType: "png")!
let image = UIImage(contentsOfFile: file)
let bundlePath = NSBundle(forClass: self.classForCoder).resourcePath?.stringByAppendingString("/ImagePicker.bundle")
let bundle = NSBundle(path: bundlePath!)
let traitCollection = UITraitCollection(displayScale: 2)
let image = UIImage(named: "flashIcon", inBundle: bundle, compatibleWithTraitCollection: traitCollection)

button.setImage(image, forState: .Normal)
button.setTitle("AUTO", forState: .Normal)
button.setTranslatesAutoresizingMaskIntoConstraints(false)

return button
}()

lazy var rotateCamera: UIButton = {
let button = UIButton()
let file = NSBundle.mainBundle().pathForResource("cameraIcon", ofType: "png")!
let image = UIImage(contentsOfFile: file)
let bundlePath = NSBundle(forClass: self.classForCoder).resourcePath?.stringByAppendingString("/ImagePicker.bundle")
let bundle = NSBundle(path: bundlePath!)
let traitCollection = UITraitCollection(displayScale: 2)
let image = UIImage(named: "cameraIcon", inBundle: bundle, compatibleWithTraitCollection: traitCollection)

button.setImage(image, forState: .Normal)
button.setTranslatesAutoresizingMaskIntoConstraints(false)

return button
}()
Expand Down

0 comments on commit b957edd

Please sign in to comment.