//
//  HomeHubStartViewController.m
//  kneet2
//
//  Created by Jason Lee on 10/20/15.
//  Copyright © 2015 ntels. All rights reserved.
//

#import "HomeHubStartViewController.h"


@interface HomeHubStartViewController () {

}
@end


#pragma mark - Class Definition

@implementation HomeHubStartViewController


- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    
    [self initUI];
    [self prepareViewDidLoad];
}


- (void)initUI {
    
}
- (void)viewDidAppear:(BOOL)animated {
    [super viewDidAppear:animated];
    
    [UIView animateWithDuration:kfAnimationDur animations:^{
        _maskView.alpha = 0.7;
    } completion:^(BOOL finished) {
        
        _constraintPopViewTop.constant = 64;
        
        [UIView animateWithDuration:kfAnimationDur animations:^{
            [self.view layoutIfNeeded];
        }];
    }];
}

- (void)prepareViewDidLoad {
}



#pragma mark - Main Logic



#pragma mark - UI Events
- (void)btnNextTouched:(id)sender {
    UIViewController *vc = [CommonUtil instantiateViewControllerWithIdentifier:@"HomeHubFirstStepViewController" storyboardName:@"HomeHub"];
    
    vc.providesPresentationContextTransitionStyle = YES;
    vc.definesPresentationContext = YES;
    
    [vc setModalPresentationStyle:UIModalPresentationOverCurrentContext];
    
    [self presentViewController:vc animated:nil completion:nil];
}

- (void)btnCloseTouched:(id)sender {
    [UIView animateWithDuration:kfAnimationDur animations:^{
        _maskView.alpha = 0.0;
    } completion:^(BOOL finished) {
        [self dismissViewControllerAnimated:YES completion:nil];
    }];
}


#pragma mark - MemoryWarning
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end