HomeHubStartViewController.m 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  1. //
  2. // HomeHubStartViewController.m
  3. // kneet2
  4. //
  5. // Created by Jason Lee on 10/20/15.
  6. // Copyright © 2015 ntels. All rights reserved.
  7. //
  8. #import "HomeHubStartViewController.h"
  9. @interface HomeHubStartViewController () {
  10. }
  11. @end
  12. #pragma mark - Class Definition
  13. @implementation HomeHubStartViewController
  14. - (void)viewDidLoad {
  15. [super viewDidLoad];
  16. // Do any additional setup after loading the view.
  17. [self initUI];
  18. [self prepareViewDidLoad];
  19. }
  20. - (void)initUI {
  21. }
  22. - (void)prepareViewDidLoad {
  23. }
  24. - (void)viewDidAppear:(BOOL)animated {
  25. [super viewDidAppear:animated];
  26. [UIView animateWithDuration:kfAnimationDur animations:^{
  27. _maskView.alpha = 0.7;
  28. } completion:^(BOOL finished) {
  29. _constraintPopViewTop.constant = 64;
  30. [UIView animateWithDuration:kfAnimationDur animations:^{
  31. [self.view layoutIfNeeded];
  32. }];
  33. }];
  34. }
  35. #pragma mark - Main Logic
  36. #pragma mark - UI Events
  37. - (void)btnNextTouched:(id)sender {
  38. UIViewController *vc = [CommonUtil instantiateViewControllerWithIdentifier:@"HomeHubFirstStepViewController" storyboardName:@"HomeHub"];
  39. vc.providesPresentationContextTransitionStyle = YES;
  40. vc.definesPresentationContext = YES;
  41. [vc setModalPresentationStyle:UIModalPresentationOverCurrentContext];
  42. [self presentViewController:vc animated:nil completion:nil];
  43. }
  44. - (void)btnCloseTouched:(id)sender {
  45. [UIView animateWithDuration:kfAnimationDur animations:^{
  46. _maskView.alpha = 0.0;
  47. } completion:^(BOOL finished) {
  48. [self dismissViewControllerAnimated:YES completion:nil];
  49. }];
  50. }
  51. #pragma mark - MemoryWarning
  52. - (void)didReceiveMemoryWarning
  53. {
  54. [super didReceiveMemoryWarning];
  55. // Dispose of any resources that can be recreated.
  56. }
  57. @end