Coder Social home page Coder Social logo

image360's Introduction

Version CocoaPods Compatible CocoaPods license Travis CI

What is this?

Image360 is a simple stack of Image360Controller + Image360View which allows you to display 360° panoramic images.

alt tag

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

 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 is a dependency manager for Cocoa projects. You can install it with the following command:

$ gem install cocoapods

To integrate Image360 into your Xcode project using CocoaPods, specify it in your Podfile:

source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '10.0'
use_frameworks!

target '<Your Target Name>' do
pod 'Image360', '~> 1.1.2'
end

Then, run the following command:

$ pod install

image360's People

Contributors

ssimboss avatar trickpirata avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.