Skip to content

Commit

Permalink
Merge pull request #43 from hyperoslo/fix/flash
Browse files Browse the repository at this point in the history
Fixes last force cast.
  • Loading branch information
zenangst committed Oct 5, 2015
2 parents 7939bbf + bfa5f99 commit 627f88a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 0 additions & 2 deletions Source/ImageGallery/ImageGalleryViewDataSource.swift
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ extension ImageGalleryView: UICollectionViewDataSource {
}
}



return cell
}
}
6 changes: 3 additions & 3 deletions Source/TopView/TopView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ class TopView: UIView {
button.setTitleColor(UIColor(red:0.52, green:0.52, blue:0.24, alpha:1), forState: .Highlighted)
button.setTitle("ON", forState: .Normal)
case "ON":
button.setImage(getImage("flashIconOff"), forState: .Normal)
button.setImage(getImage("flashIconOn"), forState: .Normal)
button.setTitleColor(.whiteColor(), forState: .Normal)
button.setTitleColor(.whiteColor(), forState: .Highlighted)
button.setTitle("OFF", forState: .Normal)
Expand All @@ -98,8 +98,8 @@ class TopView: UIView {
let bundlePath = NSBundle(forClass: self.classForCoder).resourcePath?.stringByAppendingString("/ImagePicker.bundle")
let bundle = NSBundle(path: bundlePath!)
let traitCollection = UITraitCollection(displayScale: 3)
let image = UIImage(named: name, inBundle: bundle, compatibleWithTraitCollection: traitCollection)
guard let image = UIImage(named: name, inBundle: bundle, compatibleWithTraitCollection: traitCollection) else { return UIImage() }

return image!
return image
}
}

0 comments on commit 627f88a

Please sign in to comment.