Skip to content

Instantly share code, notes, and snippets.

@rfushimi rfushimi/ViewController.m
Last active Jul 10, 2019

What would you like to do?
// ViewController.m
// NIPhotoScrollView
// Created by Ryohei Fushimi on 2018/10/04.
// Copyright © 2018 Ryohei Fushimi. All rights reserved.
#import "ViewController.h"
#import "NIPhotoScrollView.h"
#import "NIDeviceOrientation.h"
@interface ViewController ()
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
NIPhotoScrollView *scrollView = [[NIPhotoScrollView alloc] initWithFrame:self.view.frame];
UIImage *image = [UIImage imageNamed:@"yoko.png"];
[scrollView setImage:image
scrollView.photoDimensions = image.size;
scrollView.autoresizingMask = UIViewAutoresizingFlexibleDimensions;
[self.view addSubview:scrollView];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.