Skip to content

Commit

Permalink
Merge pull request #54 from cristianoccazinsp/control-both-rebased
Browse files Browse the repository at this point in the history
Option to use both finger and sensor rotation
  • Loading branch information
scihant authored Oct 3, 2021
2 parents 91b5412 + 258f6a1 commit f821549
Show file tree
Hide file tree
Showing 5 changed files with 251 additions and 60 deletions.
4 changes: 2 additions & 2 deletions CTPanoramaView.podspec
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
Pod::Spec.new do |s|
s.name = "CTPanoramaView"
s.version = "1.4"
s.version = "1.5"
s.summary = "Displays spherical or cylindrical panoramas and 360 photos with touch or motion based controls."
s.homepage = "https://github.com/scihant/CTPanoramaView"
s.screenshots = "https://cloud.githubusercontent.com/assets/3991481/23154113/ce5aa6b8-f814-11e6-9c97-4d91629733f8.gif", "https://cloud.githubusercontent.com/assets/3991481/23154919/d5f98476-f818-11e6-8c71-22011a027d96.jpg"
s.license = "MIT"
s.author = { "scihant" => "cihantek@gmail.com" }
s.source = { :git => "https://github.com/scihant/CTPanoramaView.git", :tag => s.version.to_s }

s.platform = :ios, '12.0'
s.platform = :ios, '10.0'
s.requires_arc = true
s.swift_version = '5.3'

Expand Down
4 changes: 2 additions & 2 deletions CTPanoramaView.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -349,7 +349,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand Down
4 changes: 2 additions & 2 deletions Example/Example.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = YES;
ONLY_ACTIVE_ARCH = YES;
SDKROOT = iphoneos;
Expand Down Expand Up @@ -367,7 +367,7 @@
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
IPHONEOS_DEPLOYMENT_TARGET = 12.0;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
MTL_ENABLE_DEBUG_INFO = NO;
SDKROOT = iphoneos;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ CTPanoramaView is a high-performance library that uses SceneKit to display compl

## Requirements

* iOS 8.0+
* iOS 8.0+
* v1.0 requires Xcode 8.0 and Swift 3.0
* v1.1 requires XCode 9.0 and Swift 4.0
* v1.2 requires XCode 10.0 and Swift 4.2
Expand All @@ -36,15 +36,15 @@ To install CTPanoramaView using [CocoaPods](http://cocoapods.org), add the follo

pod "CTPanoramaView", "~> 1.3"

Then run the `pod install` command and use the created workspace to open your project from now on.
Then run the `pod install` command and use the created workspace to open your project from now on.

#### Manual Install

Just add the file `CTPanoramaView.swift` (and `CTPieSliceView.swift` if you want to use it as the compass view) to your project.

#### Running the Example project

The example project is located in the Example directory. The framework target is already added as a dependency to it therefore you can run it directly.
The example project is located in the Example directory. The framework target is already added as a dependency to it therefore you can run it directly.

## Usage

Expand All @@ -67,7 +67,7 @@ panaromaView.image = image

CTPanoramaView supports two types of panoramic images:

* Spherical panoramas (also called 360 photos)
* Spherical panoramas (also called 360 photos)
* Cylindrical panoramas

All panoramas should be full. Partial panoramas (panoramas with a field of view of less than 360º) are not supported. For a spherical panorama, the image should use [equirectangular projection](https://en.wikipedia.org/wiki/Equirectangular_projection). Cubic format is not supported.
Expand All @@ -85,6 +85,7 @@ CTPanoramaView allows the user to navigate the panorama two different ways. To c
```swift
panaromaView.controlMethod = .touch // Touch based control
panaromaView.controlMethod = .motion // Accelerometer & gyroscope based control
panaromaView.controlMethod = .both // Accelerometer & gyroscope based control with finger movement support
```

The default control method is touch based control. You can change the control method on the fly, while the panorama is being displayed on the screen. The visible section will get automatically reset during a control method change.
Expand All @@ -102,7 +103,7 @@ When you set this property to a custom `UIView` subclass conforming to the `CTPa

```swift
// compassView is a custom view that conforms to the `CTPanoramaCompass` protocol.
panaromaView.compass = compassView
panaromaView.compass = compassView
```
The protocol contains only a single method, which is `updateUI(rotationAngle:fieldOfViewAngle:)`. Here, `rotationAngle` is the amount of rotation around the vertical axis, and `fieldOfViewAngle` is the horizontal FoV angle of the camera. Both values are in radians.

Expand Down
Loading

0 comments on commit f821549

Please sign in to comment.