Skip to content

Commit 6927701

Browse files
committed
Updated readme and podspec
1 parent cbb8ee0 commit 6927701

File tree

2 files changed

+26
-25
lines changed

2 files changed

+26
-25
lines changed

CTPanoramaView.podspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Pod::Spec.new do |s|
22
s.name = "CTPanoramaView"
33
s.version = "1.0"
4-
s.summary = "Displays spherical 360 photos or panoramic images."
4+
s.summary = "Displays spherical or cylindrical panoramas and 360 photos with touch or motion based controls."
55
s.homepage = "https://github.com/scihant/CTPanoramaView"
6-
s.screenshots = "https://s3.amazonaws.com/tek-files/static.png", "https://s3.amazonaws.com/tek-files/dynamic_rect.gif", "https://s3.amazonaws.com/tek-files/dynamic_circle.gif"
6+
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"
77
s.license = "MIT"
88
s.author = { "scihant" => "[email protected]" }
99
s.source = { :git => "https://github.com/scihant/CTPanoramaView.git", :tag => s.version.to_s }

README.md

Lines changed: 24 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
[![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
66
[![Issues](https://img.shields.io/github/issues/scihant/CTPanoramaView.svg?style=flat)](http://www.github.com/scihant/CTPanoramaView/issues?state=open)
77

8-
CTPanoramaView is a library that displays complete spherical or cylindrical panoramas with touch or orientation based controls.
8+
CTPanoramaView is a library that displays complete spherical or cylindrical panoramas with touch or motion based controls.
99

10-
![Panorama Demo](http://s3.amazonaws.com/tek-files/panorama_demo.gif)
10+
![panorama_demo](https://cloud.githubusercontent.com/assets/3991481/23154113/ce5aa6b8-f814-11e6-9c97-4d91629733f8.gif)
1111

1212
## Requirements
1313

1414
* iOS 8.0+
1515
* Xcode 8.0+
1616
* Swift 3.0+
1717

18-
CTPanoramaView can also be used both from Objective-C and Swift code.
18+
CTPanoramaView can be used both from Objective-C and Swift code.
1919

2020
## Installation
2121

@@ -37,50 +37,51 @@ Then run the `pod install` command and use the created workspace to open your pr
3737

3838
#### Manual Install
3939

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

4242
#### Running the Example project
4343

4444
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.
4545

4646
## Usage
4747

48-
Create an instance of `CTPanoramaView` either in code or using a Storyboard/nib.
48+
Create an instance of `CTPanoramaView` either in code or using a Storyboard/Nib.
4949

5050
Then load a panoramic image and set it as the image of the CTPanoramaView instance:
5151

5252
```swift
53-
// Create an instance of CTPanoramaView called "panoramaView" somewhere
54-
let image = UIImage(named: "panoramicImage.png")
55-
panaromaView.image = image
53+
// Create an instance of CTPanoramaView called "panoramaView" somewhere
54+
// ...
55+
let image = UIImage(named: "panoramicImage.png")
56+
panaromaView.image = image
5657
```
5758

58-
![Example](https://s3.amazonaws.com/tek-files/dynamic_rect.gif)
59+
![panorama_screenshot](https://cloud.githubusercontent.com/assets/3991481/23154919/d5f98476-f818-11e6-8c71-22011a027d96.jpg)
5960

6061
## Configuration
6162

6263
### Panorama Types
6364

6465
CTPanoramaView supports two types of panoramic images:
6566

66-
* Spherical panoramas, which are also called 360 photos.
67-
* Cylindrical panoramas.
67+
* Spherical panoramas (also called 360 photos)
68+
* Cylindrical panoramas
6869

69-
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 projections](https://en.wikipedia.org/wiki/Equirectangular_projection). Cubic format is not supported.
70+
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.
7071

7172
CTPanoramaView will automatically determine whether the given image is a spherical or cylindircal panorama by looking at the aspect ratio of the image. If it is 2:1, then it will assume a spherical panorama. If you want to override this default value, change the value of the `panoramaType` property after the image is set.
7273

7374
```swift
7475
panaromaView.panoramaType = .spherical // or .cylindrical
7576
```
7677

77-
### Control Modes
78+
### Control Methods
7879

7980
CTPanoramaView allows the user to navigate the panorama two different ways. To change the control method, use the `controlMethod` property.
8081

8182
```swift
82-
panaromaView.controlMethod = .Touch // Touch based control
83-
panaromaView.controlMethod = .Motion // Accelerometer&gyroscope based control
83+
panaromaView.controlMethod = .touch // Touch based control
84+
panaromaView.controlMethod = .motion // Accelerometer & gyroscope based control
8485
```
8586

8687
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.
@@ -89,20 +90,20 @@ The default control method is touch based control. You can change the control me
8990

9091
All orientations are supported. Orientation changes are automatically handled. Therefore you don't have to worry about things getting messed up after an orientation change.
9192

92-
### Radar
93+
### Compass
9394

94-
If you want to display a radar that shows where the user is currently looking at, use the `radar` property.
95-
When you set this property to a custom `UIView` subclass conforming to the `CTPanoramaRadar` protocol, the view will automatically supplied with rotation and field of view angles whenever one of them changes.
95+
If you want to display a compass that shows the users current field of view, use the `compass` property.
96+
When you set this property to a custom `UIView` subclass conforming to the `CTPanoramaCompass` protocol, the view will automatically supplied with rotation and field of view angles whenever one of them changes.
9697

9798
```swift
98-
// radarView is a custom view that conforms to the `CTPanoramaRadar` protocol.
99-
panaromaView.radar = radarView
99+
// compassView is a custom view that conforms to the `CTPanoramaCompass` protocol.
100+
panaromaView.compass = compassView
100101
```
101-
The protocol contaions only a single method `updateUI(rotationAngle:fieldOfViewAngle:)`. Here, the `rotationAngle` represents the amount of rotation around the vertical axis, and the `fieldOfViewAngle` respresents the horizontal FoV angle of the camera. Both values are in radians.
102+
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.
102103

103-
You can see an example implementation of a radar in the supplied `CTPieSliceView` class. Add it into your view hierarchy somewhere above the `CTPanoramaView` instance, and then set it as the radar. You'll see that it correctly shows where the user is currently looking at accurately.
104+
You can see an example implementation of a compass in the supplied `CTPieSliceView` class. Add it into your view hierarchy somewhere above your `CTPanoramaView` instance, and then set it as its compass. You'll see that it correctly shows the current FoV accurately. Here's how `CTPieSliceView` looks in its default configuration:
104105

105-
![CTPieSliceView](https://s3.amazonaws.com/tek-files/dynamic_rect.gif)
106+
![compassview](https://cloud.githubusercontent.com/assets/3991481/23154086/a83d1542-f814-11e6-9580-40ec925137e9.jpg)
106107

107108
`CTPieSliceView` has several customizable properties such as `sliceColor`, `outerRingColor` and `bgColor`, all of which can also be modified from the interface builder thanks to its live-rendering support.
108109

0 commit comments

Comments
 (0)