CommandClassControlDetailView.m 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. //
  2. // CommandClassControlDetailView.m
  3. // kneet
  4. //
  5. // Created by Jason Lee on 3/16/15.
  6. // Copyright (c) 2015 ntels. All rights reserved.
  7. //
  8. #import "JDObject.h"
  9. #import "RequestHandler.h"
  10. #import "JDJSONModel.h"
  11. #import "DeviceModel.h"
  12. #import "CustomLabel.h"
  13. #import "CommonUtil.h"
  14. #import "CustomButton.h"
  15. #import "CustomRadioGroup.h"
  16. #import "UIImageView+WebCache.h"
  17. #import "CommandClassControlDetailView.h"
  18. #import "CommandClassControlView.h"
  19. #import "CustomImageView.h"
  20. #define GRAPH_ANI_DUR 0.5f
  21. #define DEGREES(radians)((radians) * 180 / M_PI)
  22. #define RADIANS(degree)((degree) * M_PI / 180)
  23. typedef void(^NodeCommandCompletionBlock)(id result);
  24. typedef void(^NodeCommandFailureBlock)(id error);
  25. @implementation CommandClassControlDetailView
  26. + (CommandClassControlView *)viewForCommandClass:(CmdClsType)cmdClsType
  27. {
  28. CommandClassControlView *controlView = nil;
  29. for (UIView *view in [CommonUtil nibViews:@"CommandClassControlDetailView"]) {
  30. if (view.tag == cmdClsType) {
  31. controlView = (CommandClassControlView *)view;
  32. break;
  33. }
  34. }
  35. if (!controlView) {//상위 부모에서 가져옴.
  36. controlView = [CommandClassControlView viewForCommandClass:cmdClsType];
  37. }
  38. return controlView;
  39. }
  40. @end
  41. @implementation CommandClassSwitchDetailView
  42. @end
  43. @implementation CommandClassValveDetailView
  44. @end
  45. #pragma mark - Sensors View
  46. @implementation CommandClassSensorBinaryDetailView
  47. @end
  48. @implementation CommandClassSensorMultiLevelDetailView
  49. @end