Skip to content

Instantly share code, notes, and snippets.

@nicktesla2011
Last active August 29, 2015 14:18
Show Gist options
  • Save nicktesla2011/57a9035bc9466c82823a to your computer and use it in GitHub Desktop.
Save nicktesla2011/57a9035bc9466c82823a to your computer and use it in GitHub Desktop.
Hype Xcode ViewController.m
//
// ViewController.m
//Template
//
// Created by My Company on 1/23/15.
// Copyright (c) 2015 MyComapny. All rights reserved.
//
#import "ViewController.h"
@interface ViewController ()
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
NSString *path = [[NSBundle mainBundle] pathForResource:@"Cover_animation" ofType:@"html"];
NSURL *url = [NSURL fileURLWithPath:path];
NSURLRequest *request = [NSURLRequest requestWithURL:url];
[self.webview loadRequest:request];
//you need this to make it fit
[self.webview setScalesPageToFit:YES];
[[self.webview scrollView] setBounces:NO];
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment