https://github.com/vitoziv/viphotoview
View a photo with simple and basic interactive gesture.
https://github.com/vitoziv/viphotoview
objective-c photos
Last synced: 10 months ago
JSON representation
View a photo with simple and basic interactive gesture.
- Host: GitHub
- URL: https://github.com/vitoziv/viphotoview
- Owner: vitoziv
- License: mit
- Created: 2015-01-10T03:35:45.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2018-04-28T10:06:47.000Z (about 8 years ago)
- Last Synced: 2025-03-27T00:12:01.983Z (about 1 year ago)
- Topics: objective-c, photos
- Language: Objective-C
- Size: 3.16 MB
- Stars: 228
- Watchers: 10
- Forks: 23
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# VIPhotoView
VIPhotoView is a view use to view a photo with simple and basic interactive gesture. Pinch to scale photo, double tap to scale photo, drag to scoll photo.
## Screenshot

## Installation
**CocoaPods**
`pod 'VIPhotoView', '~> 0.1'`
## Usage
Init VIPhotoView with frame and image, than add it to a view.
```Objc
- (void)viewDidLoad {
[super viewDidLoad];
UIImage *image = [UIImage imageNamed:@"test.jpg"];
VIPhotoView *photoView = [[VIPhotoView alloc] initWithFrame:self.view.bounds andImage:image];
photoView.autoresizingMask = (1 << 6) -1;
[self.view addSubview:photoView];
}
```
##License
VIPhotoView is released under the MIT license.