ThingsAddWallpadViewController.m 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  1. //
  2. // ThingsAddWallpadViewController.m
  3. // kneet
  4. //
  5. // Created by Jason Lee on 5/18/15.
  6. // Copyright (c) 2015 ntels. All rights reserved.
  7. //
  8. #import "ThingsAddWallpadViewController.h"
  9. #import "JDObject.h"
  10. #import "QRCodeViewController.h"
  11. #import "CustomLabel.h"
  12. #import "CustomButton.h"
  13. @interface ThingsAddWallpadViewController () {
  14. }
  15. @end
  16. #pragma mark - Class Definition
  17. @implementation ThingsAddWallpadViewController
  18. - (void)viewDidLoad {
  19. [super viewDidLoad];
  20. // Do any additional setup after loading the view.
  21. [self initUI];
  22. [self prepareViewDidLoad];
  23. }
  24. - (void)viewWillAppear:(BOOL)animated {
  25. [super viewWillAppear:animated];
  26. self.title = NSLocalizedString(@"새 장치 추가",nil);
  27. }
  28. - (void)initUI {
  29. //set tableview option
  30. self.tableView.delegate = self;
  31. self.tableView.dataSource = self;
  32. self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
  33. self.tableView.backgroundColor = [UIColor clearColor];
  34. self.tableView.tableFooterView = [[UIView alloc] init]; //this call table events;
  35. //Localization
  36. _lblTitle.text = NSLocalizedString(@"COMMAX 월패드를 현재 홈에 등록합니다", @"COMMAX 월패드를 현재 홈에 등록합니다");
  37. _lblStep1Title.text = NSLocalizedString(@"COMMAX 월패드에서 AoTHome 등록버튼을\n누르세요", @"COMMAX 월패드에서 AoTHome 등록버튼을\n누르세요");
  38. _lblStep2Title.text = NSLocalizedString(@"월패드에서 AoTHome 등록 과정을 진행하세요", @"월패드에서 AoTHome 등록 과정을 진행하세요");
  39. _lblStep3Title.text = NSLocalizedString(@"월패드에 나타난 QR 코드를 촬영하세요", @"월패드에 나타난 QR 코드를 촬영하세요");
  40. [_btnQRCode setTitle:NSLocalizedString(@"QR코드 촬영", @"QR코드 촬영") forState:UIControlStateNormal];
  41. }
  42. - (void)prepareViewDidLoad {
  43. }
  44. #pragma mark - Main Logic
  45. #pragma mark - UI Events
  46. - (IBAction)btnQRCodeTouched:(id)sender {
  47. QRCodeViewController *vc = (QRCodeViewController *)[CommonUtil instantiateViewControllerWithIdentifier:@"QRCodeViewController" storyboardName:@"Things"];
  48. // vc.qrcodeType = QRCodeTypeCommaxWallpad;
  49. [[JDFacade facade] presentViewControllerByPush:vc pvc:self];
  50. }
  51. #pragma mark - MemoryWarning
  52. - (void)didReceiveMemoryWarning
  53. {
  54. [super didReceiveMemoryWarning];
  55. // Dispose of any resources that can be recreated.
  56. }
  57. @end