ThingsForcedDelCompleteViewController.m 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. //
  2. // ThingsDelPlugCompleteViewController.m
  3. // OneCable
  4. //
  5. // Created by nComz on 2017. 3. 21..
  6. // Copyright © 2017년 ntels. All rights reserved.
  7. //
  8. #import "JDObject.h"
  9. #import "ThingsForcedDelCompleteViewController.h"
  10. #import "CustomLabel.h"
  11. #import "CustomButton.h"
  12. #import "CustomImageView.h"
  13. #import "MainViewController.h"
  14. #import "ThingsViewController.h"
  15. #import "ThingsDetailViewController.h"
  16. @interface ThingsForcedDelCompleteViewController ()
  17. @end
  18. @implementation ThingsForcedDelCompleteViewController
  19. - (void)viewDidLoad {
  20. [super viewDidLoad];
  21. [self initUI];
  22. [self prepareViewDidLoad];
  23. }
  24. - (void)initUI {
  25. }
  26. - (void)prepareViewDidLoad {
  27. NSMutableString *title = [NSMutableString stringWithString:_delDevice.prdName];
  28. [title appendString:@" 삭제"];
  29. _imgThings.image = [_delDevice imgaeForAddDel];
  30. _lblManufacturer.text = [_delDevice manufacturerName];
  31. _imgThingsSuccess.hidden = !_isSuccess;
  32. _imgThingsFail.hidden = _isSuccess;
  33. if (_isSuccess) {
  34. [title appendString:@" 성공"];
  35. } else {
  36. [title appendString:@" 실패"];
  37. }
  38. _lblTitle.text = title;
  39. }
  40. - (void)didReceiveMemoryWarning {
  41. [super didReceiveMemoryWarning];
  42. }
  43. - (IBAction)btnConfirmTouched:(id)sender {
  44. [self dismissViewControllerAnimated:YES completion:^{
  45. ThingsViewController *vc = [JDFacade facade].mainViewController.tvc;
  46. if (vc && [vc isKindOfClass:[ThingsViewController class]]) {
  47. [vc finishDeviveDelete];
  48. } else {
  49. ThingsDetailViewController *vc2 = (ThingsDetailViewController *)vc;
  50. [vc2 finishDeviveDelete];
  51. }
  52. }];
  53. }
  54. @end