//
//  FirstViewController.m
//  VideoPlay
//
//  Created by Barbara Hecker on 8/10/12.
//  Copyright (c) 2012 International Technology University. All rights reserved.
//

#import "FirstViewController.h"

@interface FirstViewController ()

@end

@implementation FirstViewController
@synthesize webDisplay;

- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        self.title = NSLocalizedString(@"WebView", @"WebView");
        self.tabBarItem.image = [UIImage imageNamed:@"web"];
    }
    return self;
}
							
- (void)viewDidLoad
{
    [super viewDidLoad];
	NSString *urlAddress = @"http://www.google.com";
    NSURL *url = [NSURL URLWithString:urlAddress];
    NSURLRequest *requestObj = [NSURLRequest requestWithURL:url];
    [webDisplay loadRequest:requestObj];
}

- (void)viewDidUnload
{
    [self setWebDisplay:nil];
    [super viewDidUnload];
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
}

@end
