HomeHubFirstStepViewController.m 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. //
  2. // HomeHubFirstStepViewController.m
  3. // kneet2
  4. //
  5. // Created by Jason Lee on 10/20/15.
  6. // Copyright © 2015 ntels. All rights reserved.
  7. //
  8. #import "HomeHubFirstStepViewController.h"
  9. @interface HomeHubFirstStepViewController () {
  10. }
  11. @end
  12. #pragma mark - Class Definition
  13. @implementation HomeHubFirstStepViewController
  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)btnPrevTouched:(id)sender {
  38. [UIView animateWithDuration:kfAnimationDur animations:^{
  39. _maskView.alpha = 0.0;
  40. } completion:^(BOOL finished) {
  41. [self dismissViewControllerAnimated:YES completion:nil];
  42. }];
  43. }
  44. - (void)btnNextTouched:(id)sender {
  45. UIViewController *vc = [CommonUtil instantiateViewControllerWithIdentifier:@"HomeHubSecondStepViewController" storyboardName:@"HomeHub"];
  46. vc.providesPresentationContextTransitionStyle = YES;
  47. vc.definesPresentationContext = YES;
  48. [vc setModalPresentationStyle:UIModalPresentationOverCurrentContext];
  49. [self presentViewController:vc animated:nil completion:nil];
  50. }
  51. - (void)btnCloseTouched:(id)sender {
  52. [UIView animateWithDuration:kfAnimationDur animations:^{
  53. _maskView.alpha = 0.0;
  54. } completion:^(BOOL finished) {
  55. [[JDFacade facade] dismissModalStack:NO completion:nil];
  56. }];
  57. }
  58. #pragma mark - MemoryWarning
  59. - (void)didReceiveMemoryWarning
  60. {
  61. [super didReceiveMemoryWarning];
  62. // Dispose of any resources that can be recreated.
  63. }
  64. @end