Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sachinkesiraju/SKPanoramaView
Create beautiful animated panorama views. Inspired by the intro view on the LinkedIn iOS app.
https://github.com/sachinkesiraju/SKPanoramaView
panorama
Last synced: about 2 months ago
JSON representation
Create beautiful animated panorama views. Inspired by the intro view on the LinkedIn iOS app.
- Host: GitHub
- URL: https://github.com/sachinkesiraju/SKPanoramaView
- Owner: sachinkesiraju
- License: mit
- Created: 2015-01-23T01:06:26.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2017-03-10T03:21:08.000Z (almost 8 years ago)
- Last Synced: 2024-03-15T07:01:44.104Z (10 months ago)
- Topics: panorama
- Language: Objective-C
- Homepage:
- Size: 174 MB
- Stars: 191
- Watchers: 13
- Forks: 34
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome - SKPanoramaView - Create beautiful animated panorama views. Inspired by the intro view on the LinkedIn iOS app. (OOM-Leaks-Crash / Panorama)
README
# SKPanoramaView
Create beautiful animated panorama views. Inspired by the intro on the LinkedIn iOS app.Features
- Adapts to any image - Automatically sets the panorama view based on the dimensions of the image.
- Super easy to implement - Just 3 lines of code required.Perfect for intro views or background views.
Installation
Cocoapods
SKPanoramaView is available through Cocoapods. To install it, simply add the following to your Podfile.
```
pod 'SKPanoramaView'
```Alternative
Alternatively, you can always just drag and drop the folder 'SKPanoramaView' into your project and ``#import "SKPanoramaView.h"`` and you're good to go.Implementation
SKPanoramaView is super easy to implement. Just add the following lines of code to your view and you're done!
```
SKPanoramaView *panoramaView = [[SKPanoramaView alloc] initWithFrame:self.view.frame image:[UIImage imageNamed:@"golden gate"]];
[self.view addSubview:panoramaView];
[panoramaView startAnimating];
```
Optionally, you can set the animation duration of the view as follows:
```
panoramaView.animationDuration = 15.0f; //15 seconds (Default: 10s)
```
and set the start position of the animation as follows:
```
panoramaView.startPosition = SKPanoramaStartPositionLeft; // (starts animation from either left or right side; default:left)
```Subviews can easily be added to the panorama view to create the effect as shown below
By simply using:
```
SKPanoramaView *panoramaView = [[SKPanoramaView alloc] initWithFrame:self.view.frame image:[UIImage imageNamed:@"new york"]];
panoramaView.animationDuration = 60;
[self.view addSubview:panoramaView];
[panoramaView startAnimating];
UIView *overlayView = [[UIView alloc] initWithFrame:self.view.frame];
overlayView.backgroundColor = [UIColor blackColor];
overlayView.alpha = 0.4;
[panoramaView addSubview:overlayView];
UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"linkedin"]];
imageView.center = panoramaView.center;
[panoramaView addSubview:imageView];
```For more help on how to do this, check out the Demo.
License
SKPanoramaView is available under the MIT License. For more information, see the LICENSE file.