Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/Ssimboss/Image360
Special view & controller to display 360° panoramic images
https://github.com/Ssimboss/Image360
360 360-photo 360degree 360photo panorama panorama-image
Last synced: about 2 months ago
JSON representation
Special view & controller to display 360° panoramic images
- Host: GitHub
- URL: https://github.com/Ssimboss/Image360
- Owner: Ssimboss
- License: mit
- Created: 2017-01-24T11:43:58.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2019-09-22T18:24:59.000Z (over 5 years ago)
- Last Synced: 2024-10-31T15:54:27.358Z (3 months ago)
- Topics: 360, 360-photo, 360degree, 360photo, panorama, panorama-image
- Language: Swift
- Homepage:
- Size: 41.4 MB
- Stars: 47
- Watchers: 6
- Forks: 20
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
- awesome - Image360 - Special view & controller to display 360° panoramic images. (OOM-Leaks-Crash / Panorama)
README
[![Version](https://img.shields.io/github/tag/Ssimboss/Image360.svg?label=release)](https://github.com/Ssimboss/Image360/tree/1.1.5)
[![CocoaPods Compatible](https://img.shields.io/badge/CocoaPods-compatible-4BC51D.svg)](https://cocoapods.org/pods/Image360)
[![CocoaPods license](https://img.shields.io/cocoapods/l/Image360.svg)](https://github.com/Ssimboss/Image360/blob/master/LICENSE)
![Travis CI](https://api.travis-ci.org/Ssimboss/Image360.svg?branch=master)# What is this?
Image360 is a simple stack of Image360Controller + Image360View which allows you to display 360° panoramic images.
![alt tag](https://raw.githubusercontent.com/Ssimboss/Image360/master/example.gif)## How to use it?
- Create an instance of `Image360Controller` in your code.
- Set 360° image as `image: UIImage` of just created instance.
- Use `inertia: Float` of instance to setup inertia of gestures.
- You can switch off special orientation subview(compass view) with `isOrientationViewHidden: Bool` flag.
- `Image360View` is controled by `Image360Controller` with gestures and device motions by default. You can switch off this features via `isDeviceMotionControlEnabled: Bool` and `isGestureControlEnabled: Bool` flags.
### Example
```swift
class ViewController: UIViewController {
...
// Image360Controller is inserted to view with container view and bind with "image360" segue
override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
if let identifier = segue.identifier {
switch identifier {
case "image360":
if let destination = segue.destination as? Image360Controller {
destination.image = UIImage(named: "MyPanoramicImage")
}
default:
()
}
}
}
```For more details look at "iOS Example" in this repository.
## Installation
### CocoaPods
[CocoaPods](http://cocoapods.org) is a dependency manager for Cocoa projects. You can install it with the following command:
```bash
$ gem install cocoapods
```To integrate Image360 into your Xcode project using CocoaPods, specify it in your `Podfile`:
```ruby
source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!target '' do
pod 'Image360', '~> 1.1.5'
end
```Then, run the following command:
```bash
$ pod install
```