60 lines
1.2 KiB
Objective-C
60 lines
1.2 KiB
Objective-C
//
|
|
// RulesWebViewController.m
|
|
// Freestyle Judo
|
|
//
|
|
// Created by Vincente D'Ingianni on 10/6/13.
|
|
// Copyright (c) 2013 Binary Systems, Inc. All rights reserved.
|
|
//
|
|
|
|
#import "RulesWebViewController.h"
|
|
|
|
|
|
@implementation RulesWebViewController
|
|
|
|
@synthesize webView = _webView;
|
|
@synthesize HelpToolbar = _HelpToolbar;
|
|
@synthesize DoneButton = _DoneButton;
|
|
|
|
|
|
- (void) viewWillAppear: (BOOL)animated
|
|
{
|
|
[super viewWillAppear:animated];
|
|
self.webView.scalesPageToFit = YES;
|
|
|
|
NSString *path = [[NSBundle mainBundle] pathForResource:@"FREESTYLE_JUDO_HANDBOOK" ofType:@"pdf"];
|
|
NSURL *targetURL = [NSURL fileURLWithPath:path];
|
|
NSURLRequest *request = [NSURLRequest requestWithURL:targetURL];
|
|
|
|
[_webView loadRequest:request];
|
|
|
|
[self.view addSubview:_webView];
|
|
}
|
|
|
|
|
|
- (BOOL) shouldAutorotateTOInterfaceOrientation:(UIInterfaceOrientation) interfaceOrientation
|
|
{
|
|
return YES;
|
|
}
|
|
|
|
|
|
- (void)viewDidLoad
|
|
{
|
|
[super viewDidLoad];
|
|
// Do any additional setup after loading the view.
|
|
|
|
}
|
|
|
|
- (void)didReceiveMemoryWarning
|
|
{
|
|
[super didReceiveMemoryWarning];
|
|
// Dispose of any resources that can be recreated.
|
|
}
|
|
|
|
|
|
- (IBAction)goBack:(UIBarButtonItem *)sender {
|
|
[self dismissViewControllerAnimated:YES completion:nil];
|
|
}
|
|
|
|
|
|
@end
|