HomeHubStartViewController.m 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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)viewDidAppear:(BOOL)animated {
  23. [super viewDidAppear:animated];
  24. [UIView animateWithDuration:kfAnimationDur animations:^{
  25. _maskView.alpha = 0.7;
  26. } completion:^(BOOL finished) {
  27. _constraintPopViewTop.constant = 64;
  28. [UIView animateWithDuration:kfAnimationDur animations:^{
  29. [self.view layoutIfNeeded];
  30. }];
  31. }];
  32. }
  33. - (void)prepareViewDidLoad {
  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