//
//  ViewController.m
//  SnowFalling Sample
//
//  Created by Danilo Priore on 21/12/11.
//  Copyright (c) 2011 Prioregroup.com. All rights reserved.
//

#import "ViewController.h"
#import <SnowFallingTrial/SnowFalling.h>

@implementation ViewController

#pragma mark - View lifecycle

- (void)viewDidLoad
{
    [super viewDidLoad];
	
    // ARC
	SnowFalling *snow = [[SnowFalling alloc] initWithView:self.view];
    
    // personalize values (optional)
    snow.numbersOfFlake = 50;
    snow.directionsOfFlake = SnowFlakeDirectionBoth;
    snow.imageOfFlake = [UIImage imageNamed:@"snow_flake.png"];
    
	snow.hidden = NO;
}

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

@end
