HomeHubThirdStepViewController.m 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. //
  2. // HomeHubThirdStepViewController.m
  3. // kneet2
  4. //
  5. // Created by Jason Lee on 10/23/15.
  6. // Copyright © 2015 ntels. All rights reserved.
  7. //
  8. #import "HomeHubThirdStepViewController.h"
  9. @interface HomeHubThirdStepViewController () {
  10. }
  11. @end
  12. #pragma mark - Class Definition
  13. @implementation HomeHubThirdStepViewController
  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. - (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:@"QRCodeViewController" 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