//
//  AboutViewController.m
//  FinalProject
//
//  Created by Sean Campbell on 12/2/13.
//  Copyright (c) 2013 Sean Campbell. All rights reserved.
//

#import "AboutViewController.h"

#define SCREEN_WIDTH [UIScreen mainScreen].bounds.size.width
#define SCREEN_HEIGHT [UIScreen mainScreen].bounds.size.height
#define HORIZONTAL_MARGIN 10
#define VERTICAL_MARGIN 10

@implementation AboutViewController

- (id)init
{
    if (self = [super init]) {
        self.title = @"About";
        
        self.view.backgroundColor = [UIColor whiteColor];
        
        aboutInfoLabel = [[UILabel alloc] initWithFrame: CGRectMake(HORIZONTAL_MARGIN, VERTICAL_MARGIN, SCREEN_WIDTH - HORIZONTAL_MARGIN * 2, 30 * 10)];
        aboutInfoLabel.numberOfLines = 30;
        aboutInfoLabel.text = @"To begin, choose a set of symbols from the main menu, then a symbol to begin drawing. You can also choose \"Play Set\" to go through the entire set in one go.\n\nYou will be scored both on how accurate your drawing is and on how long it takes you to complete it.";
        [self.view addSubview: aboutInfoLabel];
    }
    return self;
}


- (void)viewDidLoad
{
    [super viewDidLoad];
}

- (void)viewDidUnload
{
    [super viewDidUnload];
    // Release any retained subviews of the main view.
    aboutInfoLabel = nil;
}

- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    if ([[UIDevice currentDevice] userInterfaceIdiom] == UIUserInterfaceIdiomPhone) {
        return (interfaceOrientation != UIInterfaceOrientationPortraitUpsideDown);
    } else {
        return YES;
    }
}


@end
