The ImageViewer is a very simple image viewer for iOS, which behaviour is inspired by the facebook app and completely written in Swift 2.0.
Using Carthage:
- Create a cartfile with following content within your project directory:
github "mollywoodnini/ImageViewer"
- run
carthage update
. Carthage builds the ImageViewer framework, which you'll have to import to your project. - On your application targets’ “General” settings tab, in the “Linked Frameworks and Libraries” section, drag and drop both frameworks from the Carthage/Build folder on disk.
- On your application targets’ “Build Phases” settings tab, click the “+” icon and choose “New Run Script Phase”. Create a Run Script with the following contents:
/usr/local/bin/carthage copy-frameworks
and add the paths to the frameworks under “Input Files”:
$(SRCROOT)/Carthage/Build/iOS/ImageViewer.framework
Just create an ImageView and prepare it for the ImageViewer via:
imageView.setupForImageViewer()
You can specify the background color of the ImageViewer too:
imageView.setupForImageViewer(UIColor.redColor())
To hide the status bar add the "View controller-based status bar appearance" key to the Info.plist and set its value to NO.
- iOS 8.0+
- Xcode 7.0+
Released under the MIT license. See the LICENSE file for more info.