diff --git a/Source/ImageGallery/ImageGalleryViewDataSource.swift b/Source/ImageGallery/ImageGalleryViewDataSource.swift index 09722e17..367156cf 100644 --- a/Source/ImageGallery/ImageGalleryViewDataSource.swift +++ b/Source/ImageGallery/ImageGalleryViewDataSource.swift @@ -41,8 +41,6 @@ extension ImageGalleryView: UICollectionViewDataSource { } } - - return cell } } diff --git a/Source/TopView/TopView.swift b/Source/TopView/TopView.swift index 804a2cfb..d4ff42f7 100644 --- a/Source/TopView/TopView.swift +++ b/Source/TopView/TopView.swift @@ -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) @@ -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 } }