HomeHubSecondStepViewController.m 1.9 KB

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