Browse Source

-- commit

Jason Lee 10 years ago
parent
commit
8a2613c6f8
33 changed files with 4591 additions and 1478 deletions
  1. 44 16
      kneet2.xcodeproj/project.pbxproj
  2. 34 0
      kneet2/Base.lproj/Rules.storyboard
  3. 20 2
      kneet2/Classes/CommonUI/DaysPopupView.xib
  4. 0 34
      kneet2/Classes/CommonUI/ExternHeatPopupView.h
  5. 0 209
      kneet2/Classes/CommonUI/ExternHeatPopupView.m
  6. 0 664
      kneet2/Classes/CommonUI/ExternHeatPopupView.xib
  7. 109 0
      kneet2/Classes/CommonUI/WeatherLocationPopupTableViewCell.xib
  8. 38 0
      kneet2/Classes/CommonUI/WeatherLocationPopupView.h
  9. 158 0
      kneet2/Classes/CommonUI/WeatherLocationPopupView.m
  10. 412 0
      kneet2/Classes/CommonUI/WeatherLocationPopupView.xib
  11. 5 1
      kneet2/Classes/Model/ItemModel.h
  12. 3 0
      kneet2/Classes/Model/ItemModel.m
  13. 39 40
      kneet2/Classes/ViewControllers/RuelsScreens/RegisterCmdClsViewController.m
  14. 35 36
      kneet2/Classes/ViewControllers/RuelsScreens/RegisterModeViewController.m
  15. 0 62
      kneet2/Classes/ViewControllers/RuelsScreens/RegisterTimerViewController.h
  16. 0 338
      kneet2/Classes/ViewControllers/RuelsScreens/RegisterTimerViewController.m
  17. 11 0
      kneet2/Classes/ViewControllers/RuelsScreens/RulesAddViewController.h
  18. 306 40
      kneet2/Classes/ViewControllers/RuelsScreens/RulesAddViewController.m
  19. 6 7
      kneet2/Classes/ViewControllers/RuelsScreens/RulesRegisterViewController.m
  20. 19 21
      kneet2/Classes/ViewControllers/RuelsScreens/RulesTriggerOptionViewController.m
  21. 0 1
      kneet2/Classes/ViewControllers/ScenesScreens/ScenesRegisterViewController.m
  22. 32 0
      kneet2/Classes/ViewControllers/ThingsScreens/DaylightPopupView.h
  23. 282 0
      kneet2/Classes/ViewControllers/ThingsScreens/DaylightPopupView.m
  24. 818 0
      kneet2/Classes/ViewControllers/ThingsScreens/DaylightPopupView.xib
  25. 33 0
      kneet2/Classes/ViewControllers/ThingsScreens/ExternHeatPopupView.h
  26. 291 0
      kneet2/Classes/ViewControllers/ThingsScreens/ExternHeatPopupView.m
  27. 840 0
      kneet2/Classes/ViewControllers/ThingsScreens/ExternHeatPopupView.xib
  28. 32 0
      kneet2/Classes/ViewControllers/ThingsScreens/TimePickerPopupView.h
  29. 231 0
      kneet2/Classes/ViewControllers/ThingsScreens/TimePickerPopupView.m
  30. 752 0
      kneet2/Classes/ViewControllers/ThingsScreens/TimePickerPopupView.xib
  31. 2 2
      kneet2/Classes/ViewControllers/ThingsScreens/TriggerSelectPopupView.h
  32. 37 3
      kneet2/Classes/ViewControllers/ThingsScreens/TriggerSelectPopupView.m
  33. 2 2
      kneet2/Classes/ViewControllers/ThingsScreens/TriggerSelectPopupView.xib

+ 44 - 16
kneet2.xcodeproj/project.pbxproj

@@ -105,7 +105,6 @@
 		A130CD4D1BF9BB4F00126AC5 /* RegisterCmdClsViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A1EA409B1BBD2B1B00FA7ABF /* RegisterCmdClsViewController.m */; };
 		A130CD4F1BF9BB4F00126AC5 /* RegisterModeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A1EA409F1BBD2B1B00FA7ABF /* RegisterModeViewController.m */; };
 		A130CD511BF9BB4F00126AC5 /* RegisterPushViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A1EA40A11BBD2B1B00FA7ABF /* RegisterPushViewController.m */; };
-		A130CD531BF9BB4F00126AC5 /* RegisterTimerViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A1EA40A31BBD2B1B00FA7ABF /* RegisterTimerViewController.m */; };
 		A130CD551BF9BB4F00126AC5 /* RuleRegisterTypeViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A1EA40A51BBD2B1B00FA7ABF /* RuleRegisterTypeViewController.m */; };
 		A130CD571BF9BB4F00126AC5 /* RulesDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A1EA40A71BBD2B1B00FA7ABF /* RulesDetailViewController.m */; };
 		A130CD591BF9BB4F00126AC5 /* RulesRegisterPredefineViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A1EA40A91BBD2B1B00FA7ABF /* RulesRegisterPredefineViewController.m */; };
@@ -151,8 +150,6 @@
 		A130CD9F1BF9BB4F00126AC5 /* CommandClassControlNodeView.xib in Sources */ = {isa = PBXBuildFile; fileRef = A17296D21BEB3E0D00327255 /* CommandClassControlNodeView.xib */; };
 		A130CDA11BF9BB4F00126AC5 /* DaysPopupView.m in Sources */ = {isa = PBXBuildFile; fileRef = A132A5581BBE4F2B004877ED /* DaysPopupView.m */; };
 		A130CDA21BF9BB4F00126AC5 /* DaysPopupView.xib in Sources */ = {isa = PBXBuildFile; fileRef = A132A5591BBE4F2B004877ED /* DaysPopupView.xib */; };
-		A130CDA41BF9BB4F00126AC5 /* ExternHeatPopupView.m in Sources */ = {isa = PBXBuildFile; fileRef = A132A55B1BBE4F2B004877ED /* ExternHeatPopupView.m */; };
-		A130CDA51BF9BB5000126AC5 /* ExternHeatPopupView.xib in Sources */ = {isa = PBXBuildFile; fileRef = A132A55C1BBE4F2B004877ED /* ExternHeatPopupView.xib */; };
 		A130CDA71BF9BB5000126AC5 /* ModePopTableView.m in Sources */ = {isa = PBXBuildFile; fileRef = A132A5641BBE4F2B004877ED /* ModePopTableView.m */; };
 		A130CDA81BF9BB5000126AC5 /* ModePopTableView.xib in Sources */ = {isa = PBXBuildFile; fileRef = A132A5651BBE4F2B004877ED /* ModePopTableView.xib */; };
 		A130CDAA1BF9BB5000126AC5 /* NoContentView.m in Sources */ = {isa = PBXBuildFile; fileRef = A132A5671BBE4F2B004877ED /* NoContentView.m */; };
@@ -180,6 +177,15 @@
 		A130CDDA1BF9C02100126AC5 /* LaunchScreen.xib in Resources */ = {isa = PBXBuildFile; fileRef = A12BBC331BA94FAE00DE1B94 /* LaunchScreen.xib */; };
 		A13671BE1C02B56B005DF6C6 /* TriggerSelectPopupView.m in Sources */ = {isa = PBXBuildFile; fileRef = A13671BC1C02B56A005DF6C6 /* TriggerSelectPopupView.m */; };
 		A13671BF1C02B56B005DF6C6 /* TriggerSelectPopupView.xib in Resources */ = {isa = PBXBuildFile; fileRef = A13671BD1C02B56A005DF6C6 /* TriggerSelectPopupView.xib */; };
+		A13671C51C03F5EC005DF6C6 /* TimePickerPopupView.m in Sources */ = {isa = PBXBuildFile; fileRef = A13671C31C03F5EC005DF6C6 /* TimePickerPopupView.m */; };
+		A13671C61C03F5EC005DF6C6 /* TimePickerPopupView.xib in Resources */ = {isa = PBXBuildFile; fileRef = A13671C41C03F5EC005DF6C6 /* TimePickerPopupView.xib */; };
+		A13671CB1C0446CB005DF6C6 /* DaylightPopupView.m in Sources */ = {isa = PBXBuildFile; fileRef = A13671C91C0446CB005DF6C6 /* DaylightPopupView.m */; };
+		A13671CC1C0446CB005DF6C6 /* DaylightPopupView.xib in Resources */ = {isa = PBXBuildFile; fileRef = A13671CA1C0446CB005DF6C6 /* DaylightPopupView.xib */; };
+		A13671D11C0451A2005DF6C6 /* WeatherLocationPopupTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = A13671CD1C0451A2005DF6C6 /* WeatherLocationPopupTableViewCell.xib */; };
+		A13671D21C0451A2005DF6C6 /* WeatherLocationPopupView.m in Sources */ = {isa = PBXBuildFile; fileRef = A13671CF1C0451A2005DF6C6 /* WeatherLocationPopupView.m */; };
+		A13671D31C0451A2005DF6C6 /* WeatherLocationPopupView.xib in Resources */ = {isa = PBXBuildFile; fileRef = A13671D01C0451A2005DF6C6 /* WeatherLocationPopupView.xib */; };
+		A13671D81C046654005DF6C6 /* ExternHeatPopupView.m in Sources */ = {isa = PBXBuildFile; fileRef = A13671D61C046654005DF6C6 /* ExternHeatPopupView.m */; };
+		A13671D91C046654005DF6C6 /* ExternHeatPopupView.xib in Resources */ = {isa = PBXBuildFile; fileRef = A13671D71C046654005DF6C6 /* ExternHeatPopupView.xib */; };
 		A17D62221BFEB2530030FE56 /* RulesAddViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = A17D62211BFEB2530030FE56 /* RulesAddViewController.m */; };
 		B07AEF45071D67A7C948B31B /* Pods.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6B1A9CF6F5E71320D607201 /* Pods.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
 /* End PBXBuildFile section */
@@ -303,9 +309,6 @@
 		A132A5571BBE4F2B004877ED /* DaysPopupView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DaysPopupView.h; sourceTree = "<group>"; };
 		A132A5581BBE4F2B004877ED /* DaysPopupView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DaysPopupView.m; sourceTree = "<group>"; };
 		A132A5591BBE4F2B004877ED /* DaysPopupView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = DaysPopupView.xib; sourceTree = "<group>"; };
-		A132A55A1BBE4F2B004877ED /* ExternHeatPopupView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExternHeatPopupView.h; sourceTree = "<group>"; };
-		A132A55B1BBE4F2B004877ED /* ExternHeatPopupView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExternHeatPopupView.m; sourceTree = "<group>"; };
-		A132A55C1BBE4F2B004877ED /* ExternHeatPopupView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ExternHeatPopupView.xib; sourceTree = "<group>"; };
 		A132A5631BBE4F2B004877ED /* ModePopTableView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModePopTableView.h; sourceTree = "<group>"; };
 		A132A5641BBE4F2B004877ED /* ModePopTableView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ModePopTableView.m; sourceTree = "<group>"; };
 		A132A5651BBE4F2B004877ED /* ModePopTableView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ModePopTableView.xib; sourceTree = "<group>"; };
@@ -331,6 +334,19 @@
 		A13671BB1C02B56A005DF6C6 /* TriggerSelectPopupView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TriggerSelectPopupView.h; path = kneet2/Classes/ViewControllers/ThingsScreens/TriggerSelectPopupView.h; sourceTree = SOURCE_ROOT; };
 		A13671BC1C02B56A005DF6C6 /* TriggerSelectPopupView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TriggerSelectPopupView.m; path = kneet2/Classes/ViewControllers/ThingsScreens/TriggerSelectPopupView.m; sourceTree = SOURCE_ROOT; };
 		A13671BD1C02B56A005DF6C6 /* TriggerSelectPopupView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = TriggerSelectPopupView.xib; path = kneet2/Classes/ViewControllers/ThingsScreens/TriggerSelectPopupView.xib; sourceTree = SOURCE_ROOT; };
+		A13671C21C03F5EC005DF6C6 /* TimePickerPopupView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TimePickerPopupView.h; path = kneet2/Classes/ViewControllers/ThingsScreens/TimePickerPopupView.h; sourceTree = SOURCE_ROOT; };
+		A13671C31C03F5EC005DF6C6 /* TimePickerPopupView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = TimePickerPopupView.m; path = kneet2/Classes/ViewControllers/ThingsScreens/TimePickerPopupView.m; sourceTree = SOURCE_ROOT; };
+		A13671C41C03F5EC005DF6C6 /* TimePickerPopupView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = TimePickerPopupView.xib; path = kneet2/Classes/ViewControllers/ThingsScreens/TimePickerPopupView.xib; sourceTree = SOURCE_ROOT; };
+		A13671C81C0446CB005DF6C6 /* DaylightPopupView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DaylightPopupView.h; path = kneet2/Classes/ViewControllers/ThingsScreens/DaylightPopupView.h; sourceTree = SOURCE_ROOT; };
+		A13671C91C0446CB005DF6C6 /* DaylightPopupView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = DaylightPopupView.m; path = kneet2/Classes/ViewControllers/ThingsScreens/DaylightPopupView.m; sourceTree = SOURCE_ROOT; };
+		A13671CA1C0446CB005DF6C6 /* DaylightPopupView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = DaylightPopupView.xib; path = kneet2/Classes/ViewControllers/ThingsScreens/DaylightPopupView.xib; sourceTree = SOURCE_ROOT; };
+		A13671CD1C0451A2005DF6C6 /* WeatherLocationPopupTableViewCell.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = WeatherLocationPopupTableViewCell.xib; path = kneet2/Classes/CommonUI/WeatherLocationPopupTableViewCell.xib; sourceTree = SOURCE_ROOT; };
+		A13671CE1C0451A2005DF6C6 /* WeatherLocationPopupView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WeatherLocationPopupView.h; path = kneet2/Classes/CommonUI/WeatherLocationPopupView.h; sourceTree = SOURCE_ROOT; };
+		A13671CF1C0451A2005DF6C6 /* WeatherLocationPopupView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = WeatherLocationPopupView.m; path = kneet2/Classes/CommonUI/WeatherLocationPopupView.m; sourceTree = SOURCE_ROOT; };
+		A13671D01C0451A2005DF6C6 /* WeatherLocationPopupView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = WeatherLocationPopupView.xib; path = kneet2/Classes/CommonUI/WeatherLocationPopupView.xib; sourceTree = SOURCE_ROOT; };
+		A13671D51C046654005DF6C6 /* ExternHeatPopupView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExternHeatPopupView.h; path = kneet2/Classes/ViewControllers/ThingsScreens/ExternHeatPopupView.h; sourceTree = SOURCE_ROOT; };
+		A13671D61C046654005DF6C6 /* ExternHeatPopupView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = ExternHeatPopupView.m; path = kneet2/Classes/ViewControllers/ThingsScreens/ExternHeatPopupView.m; sourceTree = SOURCE_ROOT; };
+		A13671D71C046654005DF6C6 /* ExternHeatPopupView.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = ExternHeatPopupView.xib; path = kneet2/Classes/ViewControllers/ThingsScreens/ExternHeatPopupView.xib; sourceTree = SOURCE_ROOT; };
 		A14023E81BD8CAE30013756C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/HomeHub.storyboard; sourceTree = "<group>"; };
 		A14023EB1BD8CB7B0013756C /* HomeHubFirstStepViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = HomeHubFirstStepViewController.h; sourceTree = "<group>"; };
 		A14023EC1BD8CB7B0013756C /* HomeHubFirstStepViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = HomeHubFirstStepViewController.m; sourceTree = "<group>"; };
@@ -432,8 +448,6 @@
 		A1EA409F1BBD2B1B00FA7ABF /* RegisterModeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegisterModeViewController.m; sourceTree = "<group>"; };
 		A1EA40A01BBD2B1B00FA7ABF /* RegisterPushViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterPushViewController.h; sourceTree = "<group>"; };
 		A1EA40A11BBD2B1B00FA7ABF /* RegisterPushViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegisterPushViewController.m; sourceTree = "<group>"; };
-		A1EA40A21BBD2B1B00FA7ABF /* RegisterTimerViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RegisterTimerViewController.h; sourceTree = "<group>"; };
-		A1EA40A31BBD2B1B00FA7ABF /* RegisterTimerViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RegisterTimerViewController.m; sourceTree = "<group>"; };
 		A1EA40A41BBD2B1B00FA7ABF /* RuleRegisterTypeViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RuleRegisterTypeViewController.h; sourceTree = "<group>"; };
 		A1EA40A51BBD2B1B00FA7ABF /* RuleRegisterTypeViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RuleRegisterTypeViewController.m; sourceTree = "<group>"; };
 		A1EA40A61BBD2B1B00FA7ABF /* RulesDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RulesDetailViewController.h; sourceTree = "<group>"; };
@@ -867,9 +881,6 @@
 				A132A5571BBE4F2B004877ED /* DaysPopupView.h */,
 				A132A5581BBE4F2B004877ED /* DaysPopupView.m */,
 				A132A5591BBE4F2B004877ED /* DaysPopupView.xib */,
-				A132A55A1BBE4F2B004877ED /* ExternHeatPopupView.h */,
-				A132A55B1BBE4F2B004877ED /* ExternHeatPopupView.m */,
-				A132A55C1BBE4F2B004877ED /* ExternHeatPopupView.xib */,
 				A132A5631BBE4F2B004877ED /* ModePopTableView.h */,
 				A132A5641BBE4F2B004877ED /* ModePopTableView.m */,
 				A132A5651BBE4F2B004877ED /* ModePopTableView.xib */,
@@ -947,6 +958,19 @@
 				A13671BB1C02B56A005DF6C6 /* TriggerSelectPopupView.h */,
 				A13671BC1C02B56A005DF6C6 /* TriggerSelectPopupView.m */,
 				A13671BD1C02B56A005DF6C6 /* TriggerSelectPopupView.xib */,
+				A13671C21C03F5EC005DF6C6 /* TimePickerPopupView.h */,
+				A13671C31C03F5EC005DF6C6 /* TimePickerPopupView.m */,
+				A13671C41C03F5EC005DF6C6 /* TimePickerPopupView.xib */,
+				A13671C81C0446CB005DF6C6 /* DaylightPopupView.h */,
+				A13671C91C0446CB005DF6C6 /* DaylightPopupView.m */,
+				A13671CA1C0446CB005DF6C6 /* DaylightPopupView.xib */,
+				A13671D51C046654005DF6C6 /* ExternHeatPopupView.h */,
+				A13671D61C046654005DF6C6 /* ExternHeatPopupView.m */,
+				A13671D71C046654005DF6C6 /* ExternHeatPopupView.xib */,
+				A13671CE1C0451A2005DF6C6 /* WeatherLocationPopupView.h */,
+				A13671CF1C0451A2005DF6C6 /* WeatherLocationPopupView.m */,
+				A13671D01C0451A2005DF6C6 /* WeatherLocationPopupView.xib */,
+				A13671CD1C0451A2005DF6C6 /* WeatherLocationPopupTableViewCell.xib */,
 				A1EA408B1BBD2B1B00FA7ABF /* ActionPopTableView.h */,
 				A1EA408C1BBD2B1B00FA7ABF /* ActionPopTableView.m */,
 				A1EA408D1BBD2B1B00FA7ABF /* ActionPopTableView.xib */,
@@ -963,8 +987,6 @@
 				A1EA409F1BBD2B1B00FA7ABF /* RegisterModeViewController.m */,
 				A1EA40A01BBD2B1B00FA7ABF /* RegisterPushViewController.h */,
 				A1EA40A11BBD2B1B00FA7ABF /* RegisterPushViewController.m */,
-				A1EA40A21BBD2B1B00FA7ABF /* RegisterTimerViewController.h */,
-				A1EA40A31BBD2B1B00FA7ABF /* RegisterTimerViewController.m */,
 				A1EA40A41BBD2B1B00FA7ABF /* RuleRegisterTypeViewController.h */,
 				A1EA40A51BBD2B1B00FA7ABF /* RuleRegisterTypeViewController.m */,
 				A1EA40A61BBD2B1B00FA7ABF /* RulesDetailViewController.h */,
@@ -1184,9 +1206,12 @@
 			isa = PBXResourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
+				A13671D31C0451A2005DF6C6 /* WeatherLocationPopupView.xib in Resources */,
 				A130CDD51BF9C02100126AC5 /* Rules.storyboard in Resources */,
 				A130CDD61BF9C02100126AC5 /* Scenes.storyboard in Resources */,
+				A13671D91C046654005DF6C6 /* ExternHeatPopupView.xib in Resources */,
 				A130CDD11BF9BF9000126AC5 /* Images.xcassets in Resources */,
+				A13671D11C0451A2005DF6C6 /* WeatherLocationPopupTableViewCell.xib in Resources */,
 				A130CDCF1BF9BE6800126AC5 /* SignUp.storyboard in Resources */,
 				A130CDDA1BF9C02100126AC5 /* LaunchScreen.xib in Resources */,
 				A130CDD31BF9C02100126AC5 /* HomeHub.storyboard in Resources */,
@@ -1196,6 +1221,8 @@
 				A130CDD91BF9C02100126AC5 /* Common.storyboard in Resources */,
 				A13671BF1C02B56B005DF6C6 /* TriggerSelectPopupView.xib in Resources */,
 				A130CDD81BF9C02100126AC5 /* Settings.storyboard in Resources */,
+				A13671C61C03F5EC005DF6C6 /* TimePickerPopupView.xib in Resources */,
+				A13671CC1C0446CB005DF6C6 /* DaylightPopupView.xib in Resources */,
 			);
 			runOnlyForDeploymentPostprocessing = 0;
 		};
@@ -1349,20 +1376,23 @@
 				A130CD2E1BF9BB4F00126AC5 /* ThingsAddIncludeViewController.m in Sources */,
 				A130CD301BF9BB4F00126AC5 /* ThingsAddCompleteViewController.m in Sources */,
 				A130CD321BF9BB4F00126AC5 /* ThingsAddFailViewController.m in Sources */,
+				A13671D21C0451A2005DF6C6 /* WeatherLocationPopupView.m in Sources */,
 				A130CD3D1BF9BB4F00126AC5 /* HomeMemberViewController.m in Sources */,
 				A130CD3F1BF9BB4F00126AC5 /* HomeMemberAddViewController.m in Sources */,
 				A130CD411BF9BB4F00126AC5 /* RulesViewController.m in Sources */,
 				A130CD431BF9BB4F00126AC5 /* ActionPopTableView.m in Sources */,
 				A130CD441BF9BB4F00126AC5 /* ActionPopTableView.xib in Sources */,
+				A13671D81C046654005DF6C6 /* ExternHeatPopupView.m in Sources */,
 				A130CD451BF9BB4F00126AC5 /* ActionPopTableViewCell.xib in Sources */,
 				A130CD461BF9BB4F00126AC5 /* CommandClassListCell.xib in Sources */,
 				A130CD481BF9BB4F00126AC5 /* CommandClassListPopupView.m in Sources */,
+				A13671CB1C0446CB005DF6C6 /* DaylightPopupView.m in Sources */,
 				A130CD491BF9BB4F00126AC5 /* CommandClassListPopupView.xib in Sources */,
 				A130CD4B1BF9BB4F00126AC5 /* PredefinedDeviceViewController.m in Sources */,
 				A130CD4D1BF9BB4F00126AC5 /* RegisterCmdClsViewController.m in Sources */,
 				A130CD4F1BF9BB4F00126AC5 /* RegisterModeViewController.m in Sources */,
 				A130CD511BF9BB4F00126AC5 /* RegisterPushViewController.m in Sources */,
-				A130CD531BF9BB4F00126AC5 /* RegisterTimerViewController.m in Sources */,
+				A13671C51C03F5EC005DF6C6 /* TimePickerPopupView.m in Sources */,
 				A130CD551BF9BB4F00126AC5 /* RuleRegisterTypeViewController.m in Sources */,
 				A130CD571BF9BB4F00126AC5 /* RulesDetailViewController.m in Sources */,
 				A13671BE1C02B56B005DF6C6 /* TriggerSelectPopupView.m in Sources */,
@@ -1409,8 +1439,6 @@
 				A130CD9F1BF9BB4F00126AC5 /* CommandClassControlNodeView.xib in Sources */,
 				A130CDA11BF9BB4F00126AC5 /* DaysPopupView.m in Sources */,
 				A130CDA21BF9BB4F00126AC5 /* DaysPopupView.xib in Sources */,
-				A130CDA41BF9BB4F00126AC5 /* ExternHeatPopupView.m in Sources */,
-				A130CDA51BF9BB5000126AC5 /* ExternHeatPopupView.xib in Sources */,
 				A130CDA71BF9BB5000126AC5 /* ModePopTableView.m in Sources */,
 				A130CDA81BF9BB5000126AC5 /* ModePopTableView.xib in Sources */,
 				A130CDAA1BF9BB5000126AC5 /* NoContentView.m in Sources */,

+ 34 - 0
kneet2/Base.lproj/Rules.storyboard

@@ -559,6 +559,40 @@
                                 <animations/>
                                 <color key="backgroundColor" red="0.93725490199999995" green="0.93725490199999995" blue="0.95686274510000002" alpha="1" colorSpace="calibratedRGB"/>
                                 <prototypes>
+                                    <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="TitleCellIdentifier" rowHeight="50" id="npa-uF-Yf4" customClass="RulesAddTitleTableViewCell">
+                                        <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
+                                        <autoresizingMask key="autoresizingMask"/>
+                                        <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="npa-uF-Yf4" id="w8Q-3D-60g">
+                                            <autoresizingMask key="autoresizingMask"/>
+                                            <subviews>
+                                                <textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" borderStyle="roundedRect" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="tfb-JT-ICa" customClass="CustomTextField">
+                                                    <rect key="frame" x="-25" y="-30" width="97" height="30"/>
+                                                    <animations/>
+                                                    <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                    <textInputTraits key="textInputTraits"/>
+                                                    <variation key="heightClass=regular-widthClass=compact" fixedFrame="YES">
+                                                        <rect key="frame" x="15" y="10" width="290" height="30"/>
+                                                    </variation>
+                                                </textField>
+                                            </subviews>
+                                            <animations/>
+                                            <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
+                                            <variation key="default">
+                                                <mask key="subviews">
+                                                    <exclude reference="tfb-JT-ICa"/>
+                                                </mask>
+                                            </variation>
+                                            <variation key="heightClass=regular-widthClass=compact">
+                                                <mask key="subviews">
+                                                    <include reference="tfb-JT-ICa"/>
+                                                </mask>
+                                            </variation>
+                                        </tableViewCellContentView>
+                                        <animations/>
+                                        <connections>
+                                            <outlet property="txtRuleTitle" destination="tfb-JT-ICa" id="xc8-Wy-4fc"/>
+                                        </connections>
+                                    </tableViewCell>
                                     <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="HeaderCellIdentifier" rowHeight="90" id="GQf-8g-8Yg" customClass="RulesAddHeaderTableViewCell">
                                         <rect key="frame" x="0.0" y="22" width="320" height="90"/>
                                         <autoresizingMask key="autoresizingMask"/>

+ 20 - 2
kneet2/Classes/CommonUI/DaysPopupView.xib

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9060" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
     </dependencies>
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
@@ -13,6 +13,7 @@
             <subviews>
                 <view alpha="0.30000001192092896" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4c3-gb-BwR" userLabel="maskView">
                     <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                    <animations/>
                     <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
                 </view>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sqq-aQ-dqD" userLabel="popUpView">
@@ -23,9 +24,11 @@
                             <subviews>
                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5X6-Mj-lUl" userLabel="View - BgColor">
                                     <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                                    <animations/>
                                     <color key="backgroundColor" red="1" green="0.43137254899999999" blue="0.16862745100000001" alpha="1" colorSpace="calibratedRGB"/>
                                 </view>
                             </subviews>
+                            <animations/>
                             <color key="backgroundColor" red="0.43921568630000002" green="0.43921568630000002" blue="0.43921568630000002" alpha="1" colorSpace="calibratedRGB"/>
                             <constraints>
                                 <constraint firstAttribute="bottom" secondItem="5X6-Mj-lUl" secondAttribute="bottom" constant="51" id="EuK-Ng-m4N">
@@ -72,6 +75,7 @@
                                     <subviews>
                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Title" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IE2-24-gHl" customClass="CustomLabel">
                                             <rect key="frame" x="0.0" y="-21" width="42" height="21"/>
+                                            <animations/>
                                             <constraints>
                                                 <constraint firstAttribute="height" constant="64" id="gmY-Rb-Qao"/>
                                             </constraints>
@@ -90,6 +94,7 @@
                                             </variation>
                                         </label>
                                     </subviews>
+                                    <animations/>
                                     <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="44" id="1fj-XN-uH0">
@@ -136,6 +141,7 @@
                                     <subviews>
                                         <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ew1-xq-xdR" customClass="CustomCheckBox">
                                             <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                            <animations/>
                                             <constraints>
                                                 <constraint firstAttribute="width" constant="36" id="icr-V1-WRM">
                                                     <variation key="heightClass=regular-widthClass=compact" constant="40"/>
@@ -163,6 +169,7 @@
                                         </button>
                                         <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Z2z-Xy-RVv" customClass="CustomCheckBox">
                                             <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                            <animations/>
                                             <constraints>
                                                 <constraint firstAttribute="height" constant="50" id="DBT-z8-cyR"/>
                                                 <constraint firstAttribute="width" constant="36" id="yZo-5h-aD5">
@@ -193,6 +200,7 @@
                                         </button>
                                         <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="uuq-AG-en4" customClass="CustomCheckBox">
                                             <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                            <animations/>
                                             <constraints>
                                                 <constraint firstAttribute="width" constant="36" id="L9l-RS-nMz">
                                                     <variation key="heightClass=regular-widthClass=compact" constant="40"/>
@@ -223,6 +231,7 @@
                                         </button>
                                         <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Wtm-G4-adQ" customClass="CustomCheckBox">
                                             <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                            <animations/>
                                             <constraints>
                                                 <constraint firstAttribute="width" constant="36" id="jqZ-pI-QXS">
                                                     <variation key="heightClass=regular-widthClass=compact" constant="40"/>
@@ -253,6 +262,7 @@
                                         </button>
                                         <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ytj-Ho-FCa" customClass="CustomCheckBox">
                                             <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                            <animations/>
                                             <constraints>
                                                 <constraint firstAttribute="width" constant="36" id="Cdr-7A-UyV">
                                                     <variation key="heightClass=regular-widthClass=compact" constant="40"/>
@@ -283,6 +293,7 @@
                                         </button>
                                         <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bVd-qb-r2M" customClass="CustomCheckBox">
                                             <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                            <animations/>
                                             <constraints>
                                                 <constraint firstAttribute="height" constant="50" id="9s7-yG-ECc"/>
                                                 <constraint firstAttribute="width" constant="36" id="mBq-dW-NoB">
@@ -313,6 +324,7 @@
                                         </button>
                                         <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="8Xo-pb-HBu" customClass="CustomCheckBox">
                                             <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                            <animations/>
                                             <constraints>
                                                 <constraint firstAttribute="width" constant="36" id="jCJ-JU-rqD">
                                                     <variation key="heightClass=regular-widthClass=compact" constant="40"/>
@@ -342,6 +354,7 @@
                                             </variation>
                                         </button>
                                     </subviews>
+                                    <animations/>
                                     <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
                                     <constraints>
                                         <constraint firstItem="Ew1-xq-xdR" firstAttribute="top" secondItem="Mw5-GF-3oQ" secondAttribute="top" constant="40" id="8Ww-9L-zrH"/>
@@ -419,6 +432,7 @@
                                 </view>
                                 <button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="249" placeholderIntrinsicWidth="149" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="EtP-9O-R3A" customClass="CustomButton">
                                     <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                    <animations/>
                                     <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
                                     <constraints>
                                         <constraint firstAttribute="height" constant="44" id="L9v-r3-6MJ">
@@ -446,6 +460,7 @@
                                 </button>
                                 <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="149" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FKG-xS-HlM" customClass="CustomButton">
                                     <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                    <animations/>
                                     <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
                                     <constraints>
                                         <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="149" id="BNE-7a-kbD">
@@ -480,6 +495,7 @@
                                     </connections>
                                 </button>
                             </subviews>
+                            <animations/>
                             <constraints>
                                 <constraint firstItem="FKG-xS-HlM" firstAttribute="top" secondItem="Mw5-GF-3oQ" secondAttribute="bottom" constant="1" id="99O-VT-gxI">
                                     <variation key="heightClass=regular-widthClass=compact" constant="1"/>
@@ -561,6 +577,7 @@
                             </variation>
                         </view>
                     </subviews>
+                    <animations/>
                     <constraints>
                         <constraint firstAttribute="bottom" secondItem="3Np-sH-ysD" secondAttribute="bottom" constant="1" id="4tu-Yz-TS5">
                             <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
@@ -611,6 +628,7 @@
                     </variation>
                 </view>
             </subviews>
+            <animations/>
             <constraints>
                 <constraint firstAttribute="centerX" secondItem="4c3-gb-BwR" secondAttribute="centerX" id="0tG-Bd-2ic"/>
                 <constraint firstAttribute="trailing" secondItem="4c3-gb-BwR" secondAttribute="trailing" id="F9j-6m-8Sq"/>

+ 0 - 34
kneet2/Classes/CommonUI/ExternHeatPopupView.h

@@ -1,34 +0,0 @@
-//
-//  ExternHeatPopupView.h
-//  kneet
-//
-//  Created by Jason Lee on 5/12/15.
-//  Copyright (c) 2015 ntels. All rights reserved.
-//
-
-@import UIKit;
-#import "CustomAlertView.h"
-
-@class CustomRadioButton;
-@class SelectButton;
-@class ItemModel;
-
-@interface ExternHeatPopupView : CustomAlertView
-
-@property (weak, nonatomic) IBOutlet CustomRadioButton *rdoOver;
-@property (weak, nonatomic) IBOutlet CustomRadioButton *rdoUnder;
-@property (weak, nonatomic) IBOutlet SelectButton *btnLocation;
-@property (weak, nonatomic) IBOutlet UIView *controlContainerView;
-
-@property (weak, nonatomic) IBOutlet CustomLabel *lblHeat;
-@property (weak, nonatomic) IBOutlet CustomLabel *lblUnit;
-@property (weak, nonatomic) IBOutlet CustomLabel *lblDesc;
-
-
-@property (strong, nonatomic) ItemModel *condition;
-@property (strong, nonatomic) NSString *externHeat;
-@property (strong, nonatomic) NSString *externCondition;
-
-- (id)initFromNib;
-
-@end

+ 0 - 209
kneet2/Classes/CommonUI/ExternHeatPopupView.m

@@ -1,209 +0,0 @@
-//
-//  ExternHeatPopupView.m
-//  kneet
-//
-//  Created by Jason Lee on 5/12/15.
-//  Copyright (c) 2015 ntels. All rights reserved.
-//
-#import "JDObject.h"
-
-#import "RequestHandler.h"
-#import "ItemModel.h"
-#import "DeviceModel.h"
-
-#import "CustomLabel.h"
-#import "CustomRadioGroup.h"
-#import "SelectButton.h"
-
-#import "ValidateUtil.h"
-
-#import "CommandClassControlView.h"
-#import "ExternHeatPopupView.h"
-
-@interface ExternHeatPopupView () {
-    CustomRadioGroup *_rgroup;
-    DeviceModel *_device;
-    NSArray<CommonCode> *_locations;
-    ItemSubModel *_subCondition;
-//    CommandClassThermostatSetPointView *_controlView;
-}
-
-@end
-
-@implementation ExternHeatPopupView
-@synthesize condition = _condition;
-
-- (id)initFromNib {
-
-    for (UIView *view in [CommonUtil nibViews:@"ExternHeatPopupView"]) {
-        if ([view isKindOfClass:[ExternHeatPopupView class]]) {
-            self = (ExternHeatPopupView *)view;
-
-            //XIB의 경우, 현재 화면 사이즈로 맞춰줘야 함.
-            self.frame = [UIScreen mainScreen].bounds;
-            self.lblTitle.text = NSLocalizedString(@"지역온도가 이 상태일 때만", @"지역온도가 이 상태일 때만");
-
-            _rgroup = [[CustomRadioGroup alloc] init];
-            [_rgroup addRadioButton:_rdoOver];
-            [_rgroup addRadioButton:_rdoUnder];
-
-
-            _device = [[DeviceModel alloc] init];
-            _device.controlMinValue = @"-100";
-            _device.controlMaxValue = @"200";
-            _device.controlStep = @"1";
-            _device.cmdclsValue = @"25";
-            _device.dataTypeCode = @"01";
-
-//            _controlView = (CommandClassThermostatSetPointView *)[CommandClassControlView viewForCommandClass:CmdClsTypeThermostatSetPoint];
-//            _controlView.device = _device;
-//            _controlView.isConditionMode = YES;
-//
-//            [_controlContainerView addSubview:_controlView];
-
-//            [_controlView mas_makeConstraints:^(MASConstraintMaker *make) {
-//                make.top.equalTo(_controlContainerView.mas_top);
-//                make.left.equalTo(_controlContainerView.mas_left);
-//                make.center.equalTo(_controlContainerView);
-//            }];
-            
-            //Localization
-            _lblHeat.text = NSLocalizedString(@"온도", @"온도");
-            _lblUnit.text = NSLocalizedString(@"℃", @"℃");
-            
-            [_rdoOver setTitle:NSLocalizedString(@"이상", @"이상") forState:UIControlStateNormal];
-            [_rdoUnder setTitle:NSLocalizedString(@"이하", @"이하") forState:UIControlStateNormal];
-            
-            _lblDesc.text = NSLocalizedString(@"바깥온도 설정은 Yahoo웨더의\n온도값을 기준으로 합니다", @"바깥온도 설정은 Yahoo웨더의\n온도값을 기준으로 합니다");
-            
-            [self.btnConfirm setTitle:NSLocalizedString(@"선택", @"선택") forState:UIControlStateNormal];
-            [self.btnCancel setTitle:NSLocalizedString(@"취소", @"취소") forState:UIControlStateNormal];
-        }
-    }
-
-    return self;
-}
-
-- (void)didMoveToSuperview {
-
-}
-
-- (void)willMoveToSuperview:(UIView *)newSuperview {
-    if (!newSuperview)
-        return;
-
-    if (!_locations) {
-        [self requestLocationCode];
-    }
-}
-
-- (void)requestLocationCode {
-
-    NSString *path = [NSString stringWithFormat:API_GET_LOCATION_CODES];
-
-    [[RequestHandler handler] sendAsyncGetRequestAPIPath:path parameters:nil modelClass:[CommonCodeList class] completion:^(id responseObject) {
-        if (!responseObject) {//응답결과가 잘못되었거나 없을 경우,
-            return;
-        }
-
-        CommonCodeList *result = (CommonCodeList *) responseObject;
-
-        if (result) {//API 성공 ,
-            _locations = result.list;
-            [self setLocations];
-        }
-    } failure:^(id errorObject) {
-        JDErrorModel *error = (JDErrorModel *)errorObject;
-        [[JDFacade facade] alert:error.errorMessage];
-    }];
-}
-
-
-- (void)setLocations {
-    NSArray *keys = [_locations valueForKeyPath:@"commonCode"];
-    NSArray *values = [_locations valueForKeyPath:@"commonCodeName"];
-
-    NSDictionary *dic = [NSDictionary dictionaryWithObjects:values forKeys:keys];
-
-    _btnLocation.dataDict = [[SortDictionary alloc] initWithDictionary:dic];
-
-    if (_subCondition.sourceId) {
-        [_btnLocation setSelectedValue:_subCondition.sourceId];
-    }
-}
-
-
-- (void)setCondition:(ItemModel *)condition {
-
-    _condition = condition;
-
-    if (!_condition) {
-        _condition = [[ItemModel alloc] init];
-        _condition.itemName = NSLocalizedString(@"지역온도", @"지역온도");
-        _condition.itemSubTypeCode = ksConditionSubTypeCodeExternHeat;
-    }
-
-    if (_condition.subItems && _condition.subItems.count) {
-        _subCondition = _condition.subItems[0];
-    } else {
-        _subCondition = [[ItemSubModel alloc] init];
-
-        _condition.subItems = (NSMutableArray<ItemSubModel> *)[[NSMutableArray alloc] initWithObjects:_subCondition, nil];
-    }
-
-    if (_subCondition.cmdclsValue) {
-//        _controlView.device.cmdclsValue = _subCondition.cmdclsValue;
-//        [_controlView.btnLabel setTitle:_subCondition.cmdclsValue forState:UIControlStateNormal];
-    }
-}
-
-- (ItemModel *)condition {
-    //1.Validate
-    if (![self validateCondition]) {
-        return nil;
-    }
-
-    _subCondition.sourceId = [self externLocation];
-    _subCondition.conditionTypeCode = [self externCondition];
-    _subCondition.cmdclsValue = _device.cmdclsValue;
-    _subCondition.externHeat = [NSString stringWithFormat:@"%@ %@℃ %@", _btnLocation.selectedTitle, _subCondition.cmdclsValue, self.isOver ? NSLocalizedString(@"이상", @"이상"): NSLocalizedString(@"이하", @"이하")];
-
-    return _condition;
-}
-
-- (NSString *)externHeat {
-    return _subCondition.externHeat;
-}
-
-- (NSString *)externLocation {
-    return _btnLocation.selectedValue;
-}
-
-- (NSString *)externCondition {
-    return self.isOver ? @"05" : @"03";
-}
-
-- (BOOL)isOver {
-    return _rdoOver.checked;
-}
-
-- (BOOL)validateCondition {
-
-    if (!_btnLocation.selectedValue) {
-        [[JDFacade facade] alert:NSLocalizedString(@"지역을 선택해주세요", @"지역을 선택해주세요")];
-    }
-    return _btnLocation.selectedValue;
-}
-
-
-- (void)btnConfirmTouched:(id)sender {
-
-    //1.Validate
-    if (![self validateCondition]) {
-        return;
-    }
-
-    [super btnConfirmTouched:sender];
-}
-
-@end

+ 0 - 664
kneet2/Classes/CommonUI/ExternHeatPopupView.xib

@@ -1,664 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="7706" systemVersion="14E46" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
-    <dependencies>
-        <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="7703"/>
-    </dependencies>
-    <objects>
-        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
-        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <view contentMode="scaleToFill" id="qLf-va-EAG" customClass="ExternHeatPopupView">
-            <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
-            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-            <subviews>
-                <view alpha="0.30000001192092896" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4c3-gb-BwR" userLabel="maskView">
-                    <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
-                    <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
-                </view>
-                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sqq-aQ-dqD" userLabel="popUpView">
-                    <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
-                    <subviews>
-                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="BBA-T0-3ew" userLabel="View - BgColor">
-                            <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
-                            <subviews>
-                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="5X6-Mj-lUl" userLabel="View - BgColor">
-                                    <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
-                                    <color key="backgroundColor" red="1" green="0.43137254899999999" blue="0.16862745100000001" alpha="1" colorSpace="calibratedRGB"/>
-                                </view>
-                            </subviews>
-                            <color key="backgroundColor" red="0.43921568630000002" green="0.43921568630000002" blue="0.43921568630000002" alpha="1" colorSpace="calibratedRGB"/>
-                            <constraints>
-                                <constraint firstAttribute="bottom" secondItem="5X6-Mj-lUl" secondAttribute="bottom" constant="51" id="EuK-Ng-m4N">
-                                    <variation key="heightClass=regular-widthClass=compact" constant="50"/>
-                                </constraint>
-                                <constraint firstAttribute="trailing" secondItem="5X6-Mj-lUl" secondAttribute="trailing" constant="2" id="hzf-uP-xFn">
-                                    <variation key="heightClass=regular-widthClass=compact" constant="1"/>
-                                </constraint>
-                                <constraint firstItem="5X6-Mj-lUl" firstAttribute="top" secondItem="BBA-T0-3ew" secondAttribute="top" constant="188" id="tsP-mO-kCR">
-                                    <variation key="heightClass=regular-widthClass=compact" constant="327"/>
-                                </constraint>
-                                <constraint firstItem="5X6-Mj-lUl" firstAttribute="leading" secondItem="BBA-T0-3ew" secondAttribute="leading" id="xVa-ow-71H">
-                                    <variation key="heightClass=regular-widthClass=compact" constant="1"/>
-                                </constraint>
-                            </constraints>
-                            <variation key="default">
-                                <mask key="subviews">
-                                    <exclude reference="5X6-Mj-lUl"/>
-                                </mask>
-                                <mask key="constraints">
-                                    <exclude reference="EuK-Ng-m4N"/>
-                                    <exclude reference="hzf-uP-xFn"/>
-                                    <exclude reference="tsP-mO-kCR"/>
-                                    <exclude reference="xVa-ow-71H"/>
-                                </mask>
-                            </variation>
-                            <variation key="heightClass=regular-widthClass=compact">
-                                <mask key="subviews">
-                                    <include reference="5X6-Mj-lUl"/>
-                                </mask>
-                                <mask key="constraints">
-                                    <include reference="EuK-Ng-m4N"/>
-                                    <include reference="hzf-uP-xFn"/>
-                                    <include reference="tsP-mO-kCR"/>
-                                    <include reference="xVa-ow-71H"/>
-                                </mask>
-                            </variation>
-                        </view>
-                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3Np-sH-ysD" userLabel="ContainerView">
-                            <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
-                            <subviews>
-                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7nf-Ia-7Kq" userLabel="View - Title">
-                                    <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
-                                    <subviews>
-                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Title" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IE2-24-gHl" customClass="CustomLabel">
-                                            <rect key="frame" x="0.0" y="-21" width="42" height="21"/>
-                                            <constraints>
-                                                <constraint firstAttribute="height" constant="64" id="gmY-Rb-Qao"/>
-                                            </constraints>
-                                            <fontDescription key="fontDescription" type="system" pointSize="18"/>
-                                            <color key="textColor" red="1" green="0.43137254899999999" blue="0.16862745100000001" alpha="1" colorSpace="calibratedRGB"/>
-                                            <nil key="highlightedColor"/>
-                                            <variation key="default">
-                                                <mask key="constraints">
-                                                    <exclude reference="gmY-Rb-Qao"/>
-                                                </mask>
-                                            </variation>
-                                            <variation key="heightClass=regular-widthClass=compact">
-                                                <mask key="constraints">
-                                                    <include reference="gmY-Rb-Qao"/>
-                                                </mask>
-                                            </variation>
-                                        </label>
-                                    </subviews>
-                                    <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="44" id="1fj-XN-uH0">
-                                            <variation key="heightClass=regular-widthClass=compact" constant="64"/>
-                                        </constraint>
-                                        <constraint firstItem="IE2-24-gHl" firstAttribute="leading" secondItem="7nf-Ia-7Kq" secondAttribute="leading" id="98Q-bq-Oq7"/>
-                                        <constraint firstItem="IE2-24-gHl" firstAttribute="top" secondItem="7nf-Ia-7Kq" secondAttribute="top" id="Ldj-nV-yrM">
-                                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
-                                        </constraint>
-                                        <constraint firstAttribute="trailing" secondItem="IE2-24-gHl" secondAttribute="trailing" id="mUY-4l-GjT">
-                                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
-                                        </constraint>
-                                        <constraint firstAttribute="bottom" secondItem="IE2-24-gHl" secondAttribute="bottom" id="yzV-EQ-HeM">
-                                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
-                                        </constraint>
-                                    </constraints>
-                                    <variation key="default">
-                                        <mask key="subviews">
-                                            <exclude reference="IE2-24-gHl"/>
-                                        </mask>
-                                        <mask key="constraints">
-                                            <exclude reference="1fj-XN-uH0"/>
-                                            <exclude reference="98Q-bq-Oq7"/>
-                                            <exclude reference="Ldj-nV-yrM"/>
-                                            <exclude reference="mUY-4l-GjT"/>
-                                            <exclude reference="yzV-EQ-HeM"/>
-                                        </mask>
-                                    </variation>
-                                    <variation key="heightClass=regular-widthClass=compact">
-                                        <mask key="subviews">
-                                            <include reference="IE2-24-gHl"/>
-                                        </mask>
-                                        <mask key="constraints">
-                                            <exclude reference="1fj-XN-uH0"/>
-                                            <include reference="98Q-bq-Oq7"/>
-                                            <include reference="Ldj-nV-yrM"/>
-                                            <include reference="mUY-4l-GjT"/>
-                                            <include reference="yzV-EQ-HeM"/>
-                                        </mask>
-                                    </variation>
-                                </view>
-                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Mw5-GF-3oQ" userLabel="View - message">
-                                    <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
-                                    <subviews>
-                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="nWb-bx-Pvy" userLabel="SelectButton - location" customClass="SelectButton">
-                                            <rect key="frame" x="-23" y="-15" width="46" height="30"/>
-                                            <constraints>
-                                                <constraint firstAttribute="height" constant="32" id="Lpg-En-R2v"/>
-                                                <constraint firstAttribute="width" constant="134" id="Zjw-Cz-JBk"/>
-                                            </constraints>
-                                            <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                                            <inset key="titleEdgeInsets" minX="10" minY="0.0" maxX="0.0" maxY="0.0"/>
-                                            <state key="normal" backgroundImage="tp_01_img_selectbox_bg">
-                                                <color key="titleColor" red="1" green="0.43137254899999999" blue="0.16862745100000001" alpha="1" colorSpace="calibratedRGB"/>
-                                                <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
-                                            </state>
-                                            <state key="highlighted" backgroundImage="tp_01_img_selectbox_bg_press"/>
-                                            <userDefinedRuntimeAttributes>
-                                                <userDefinedRuntimeAttribute type="rect" keyPath="rectForCapBackground">
-                                                    <rect key="value" x="20" y="0.0" width="42" height="0.0"/>
-                                                </userDefinedRuntimeAttribute>
-                                                <userDefinedRuntimeAttribute type="string" keyPath="placeHolder" value="지역선택"/>
-                                                <userDefinedRuntimeAttribute type="color" keyPath="placeHolderColor">
-                                                    <color key="value" red="0.80000000000000004" green="0.80000000000000004" blue="0.80000000000000004" alpha="1" colorSpace="calibratedRGB"/>
-                                                </userDefinedRuntimeAttribute>
-                                            </userDefinedRuntimeAttributes>
-                                            <variation key="default">
-                                                <mask key="constraints">
-                                                    <exclude reference="Lpg-En-R2v"/>
-                                                    <exclude reference="Zjw-Cz-JBk"/>
-                                                </mask>
-                                            </variation>
-                                            <variation key="heightClass=regular-widthClass=compact">
-                                                <mask key="constraints">
-                                                    <include reference="Lpg-En-R2v"/>
-                                                    <include reference="Zjw-Cz-JBk"/>
-                                                </mask>
-                                            </variation>
-                                        </button>
-                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="온도" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="XSH-Sr-Fqu" customClass="CustomLabel">
-                                            <rect key="frame" x="0.0" y="-21" width="42" height="21"/>
-                                            <constraints>
-                                                <constraint firstAttribute="height" constant="32" id="SKn-xk-feC"/>
-                                            </constraints>
-                                            <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                                            <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
-                                            <nil key="highlightedColor"/>
-                                            <variation key="default">
-                                                <mask key="constraints">
-                                                    <exclude reference="SKn-xk-feC"/>
-                                                </mask>
-                                            </variation>
-                                            <variation key="heightClass=regular-widthClass=compact">
-                                                <mask key="constraints">
-                                                    <include reference="SKn-xk-feC"/>
-                                                </mask>
-                                            </variation>
-                                        </label>
-                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NWf-cu-R3j" userLabel="View - container">
-                                            <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
-                                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
-                                            <constraints>
-                                                <constraint firstAttribute="height" constant="32" id="bFK-bX-q3F"/>
-                                                <constraint firstAttribute="width" constant="134" id="ri4-73-Qiq"/>
-                                            </constraints>
-                                            <variation key="default">
-                                                <mask key="constraints">
-                                                    <exclude reference="bFK-bX-q3F"/>
-                                                    <exclude reference="ri4-73-Qiq"/>
-                                                </mask>
-                                            </variation>
-                                            <variation key="heightClass=regular-widthClass=compact">
-                                                <mask key="constraints">
-                                                    <include reference="bFK-bX-q3F"/>
-                                                    <include reference="ri4-73-Qiq"/>
-                                                </mask>
-                                            </variation>
-                                        </view>
-                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="℃" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="pm6-ia-6LC" customClass="CustomLabel">
-                                            <rect key="frame" x="0.0" y="-21" width="42" height="21"/>
-                                            <constraints>
-                                                <constraint firstAttribute="height" constant="32" id="mZu-Va-nWc"/>
-                                            </constraints>
-                                            <fontDescription key="fontDescription" type="system" pointSize="13"/>
-                                            <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
-                                            <nil key="highlightedColor"/>
-                                            <variation key="default">
-                                                <mask key="constraints">
-                                                    <exclude reference="mZu-Va-nWc"/>
-                                                </mask>
-                                            </variation>
-                                            <variation key="heightClass=regular-widthClass=compact">
-                                                <mask key="constraints">
-                                                    <include reference="mZu-Va-nWc"/>
-                                                </mask>
-                                            </variation>
-                                        </label>
-                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="hv2-0p-pEH" customClass="CustomRadioButton">
-                                            <rect key="frame" x="-23" y="-15" width="46" height="30"/>
-                                            <constraints>
-                                                <constraint firstAttribute="width" constant="60" id="s5k-Hw-V6I"/>
-                                                <constraint firstAttribute="height" constant="25" id="uIg-KC-bBS"/>
-                                            </constraints>
-                                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
-                                            <inset key="titleEdgeInsets" minX="10" minY="0.0" maxX="0.0" maxY="0.0"/>
-                                            <state key="normal" title="이상" image="common_radiobox_default">
-                                                <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
-                                            </state>
-                                            <state key="highlighted" image="common_radiobox_checked"/>
-                                            <variation key="default">
-                                                <mask key="constraints">
-                                                    <exclude reference="s5k-Hw-V6I"/>
-                                                    <exclude reference="uIg-KC-bBS"/>
-                                                </mask>
-                                            </variation>
-                                            <variation key="heightClass=regular-widthClass=compact">
-                                                <mask key="constraints">
-                                                    <include reference="s5k-Hw-V6I"/>
-                                                    <include reference="uIg-KC-bBS"/>
-                                                </mask>
-                                            </variation>
-                                        </button>
-                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="d4d-BL-St3" customClass="CustomRadioButton">
-                                            <rect key="frame" x="-23" y="-15" width="46" height="30"/>
-                                            <constraints>
-                                                <constraint firstAttribute="height" constant="25" id="GOk-r1-GU7"/>
-                                                <constraint firstAttribute="width" constant="60" id="IJf-bm-3vq"/>
-                                            </constraints>
-                                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
-                                            <inset key="titleEdgeInsets" minX="10" minY="0.0" maxX="0.0" maxY="0.0"/>
-                                            <state key="normal" title="이하" image="common_radiobox_default">
-                                                <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
-                                            </state>
-                                            <state key="highlighted" image="common_radiobox_checked"/>
-                                            <variation key="default">
-                                                <mask key="constraints">
-                                                    <exclude reference="GOk-r1-GU7"/>
-                                                    <exclude reference="IJf-bm-3vq"/>
-                                                </mask>
-                                            </variation>
-                                            <variation key="heightClass=regular-widthClass=compact">
-                                                <mask key="constraints">
-                                                    <include reference="GOk-r1-GU7"/>
-                                                    <include reference="IJf-bm-3vq"/>
-                                                </mask>
-                                            </variation>
-                                        </button>
-                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vwh-M4-keR" customClass="CustomLabel">
-                                            <rect key="frame" x="0.0" y="-21" width="42" height="21"/>
-                                            <constraints>
-                                                <constraint firstAttribute="height" constant="30" id="vlR-Vo-Hcr"/>
-                                            </constraints>
-                                            <string key="text">바깥온도 설정은 Yahoo웨더의
-온도값을 기준으로 합니다.</string>
-                                            <fontDescription key="fontDescription" type="system" pointSize="12"/>
-                                            <color key="textColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="calibratedRGB"/>
-                                            <nil key="highlightedColor"/>
-                                            <variation key="default">
-                                                <mask key="constraints">
-                                                    <exclude reference="vlR-Vo-Hcr"/>
-                                                </mask>
-                                            </variation>
-                                            <variation key="heightClass=regular-widthClass=compact">
-                                                <mask key="constraints">
-                                                    <include reference="vlR-Vo-Hcr"/>
-                                                </mask>
-                                            </variation>
-                                        </label>
-                                    </subviews>
-                                    <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
-                                    <constraints>
-                                        <constraint firstItem="XSH-Sr-Fqu" firstAttribute="leading" secondItem="Mw5-GF-3oQ" secondAttribute="leading" constant="53" id="2X0-nh-dy9"/>
-                                        <constraint firstItem="hv2-0p-pEH" firstAttribute="top" secondItem="XSH-Sr-Fqu" secondAttribute="bottom" constant="40" id="40a-yh-EOJ">
-                                            <variation key="heightClass=regular-widthClass=compact" constant="20"/>
-                                        </constraint>
-                                        <constraint firstAttribute="bottom" secondItem="vwh-M4-keR" secondAttribute="bottom" constant="40" id="A8t-bK-edn">
-                                            <variation key="heightClass=regular-widthClass=compact" constant="50"/>
-                                        </constraint>
-                                        <constraint firstItem="XSH-Sr-Fqu" firstAttribute="centerY" secondItem="NWf-cu-R3j" secondAttribute="centerY" id="FdR-Bd-uWA"/>
-                                        <constraint firstItem="d4d-BL-St3" firstAttribute="top" secondItem="pm6-ia-6LC" secondAttribute="bottom" constant="40" id="IB1-tt-DrN">
-                                            <variation key="heightClass=regular-widthClass=compact" constant="22"/>
-                                        </constraint>
-                                        <constraint firstItem="NWf-cu-R3j" firstAttribute="top" secondItem="nWb-bx-Pvy" secondAttribute="bottom" constant="12" id="Kxr-zd-aJd"/>
-                                        <constraint firstItem="nWb-bx-Pvy" firstAttribute="top" secondItem="Mw5-GF-3oQ" secondAttribute="top" constant="40" id="MDY-AF-KA1"/>
-                                        <constraint firstItem="pm6-ia-6LC" firstAttribute="leading" secondItem="NWf-cu-R3j" secondAttribute="trailing" constant="10" id="MUh-Wn-xBJ"/>
-                                        <constraint firstItem="vwh-M4-keR" firstAttribute="top" secondItem="hv2-0p-pEH" secondAttribute="bottom" constant="40" id="NUu-d0-gEK">
-                                            <variation key="heightClass=regular-widthClass=compact" constant="20"/>
-                                        </constraint>
-                                        <constraint firstItem="XSH-Sr-Fqu" firstAttribute="leading" secondItem="hv2-0p-pEH" secondAttribute="leading" id="RWP-vF-cXK"/>
-                                        <constraint firstAttribute="trailing" secondItem="vwh-M4-keR" secondAttribute="trailing" constant="72" id="Zpj-az-bXf"/>
-                                        <constraint firstAttribute="centerX" secondItem="nWb-bx-Pvy" secondAttribute="centerX" constant="-4" id="bDq-it-zGq"/>
-                                        <constraint firstItem="d4d-BL-St3" firstAttribute="trailing" secondItem="pm6-ia-6LC" secondAttribute="trailing" id="g5w-i3-rjs"/>
-                                        <constraint firstAttribute="trailing" secondItem="pm6-ia-6LC" secondAttribute="trailing" constant="53" id="mem-q8-O1P"/>
-                                        <constraint firstItem="NWf-cu-R3j" firstAttribute="leading" secondItem="XSH-Sr-Fqu" secondAttribute="trailing" constant="10" id="uEY-59-ZKc"/>
-                                        <constraint firstItem="NWf-cu-R3j" firstAttribute="centerY" secondItem="pm6-ia-6LC" secondAttribute="centerY" constant="2" id="uUg-1X-7Kg"/>
-                                        <constraint firstItem="vwh-M4-keR" firstAttribute="leading" secondItem="Mw5-GF-3oQ" secondAttribute="leading" constant="76" id="xEo-Y6-pES"/>
-                                    </constraints>
-                                    <variation key="default">
-                                        <mask key="subviews">
-                                            <exclude reference="nWb-bx-Pvy"/>
-                                            <exclude reference="XSH-Sr-Fqu"/>
-                                            <exclude reference="NWf-cu-R3j"/>
-                                            <exclude reference="pm6-ia-6LC"/>
-                                            <exclude reference="hv2-0p-pEH"/>
-                                            <exclude reference="d4d-BL-St3"/>
-                                            <exclude reference="vwh-M4-keR"/>
-                                        </mask>
-                                        <mask key="constraints">
-                                            <exclude reference="2X0-nh-dy9"/>
-                                            <exclude reference="FdR-Bd-uWA"/>
-                                            <exclude reference="RWP-vF-cXK"/>
-                                            <exclude reference="MUh-Wn-xBJ"/>
-                                            <exclude reference="mem-q8-O1P"/>
-                                            <exclude reference="A8t-bK-edn"/>
-                                            <exclude reference="NUu-d0-gEK"/>
-                                            <exclude reference="Zpj-az-bXf"/>
-                                            <exclude reference="xEo-Y6-pES"/>
-                                            <exclude reference="IB1-tt-DrN"/>
-                                            <exclude reference="g5w-i3-rjs"/>
-                                            <exclude reference="40a-yh-EOJ"/>
-                                            <exclude reference="MDY-AF-KA1"/>
-                                            <exclude reference="bDq-it-zGq"/>
-                                            <exclude reference="Kxr-zd-aJd"/>
-                                            <exclude reference="uEY-59-ZKc"/>
-                                            <exclude reference="uUg-1X-7Kg"/>
-                                        </mask>
-                                    </variation>
-                                    <variation key="heightClass=regular-widthClass=compact">
-                                        <mask key="subviews">
-                                            <include reference="nWb-bx-Pvy"/>
-                                            <include reference="XSH-Sr-Fqu"/>
-                                            <include reference="NWf-cu-R3j"/>
-                                            <include reference="pm6-ia-6LC"/>
-                                            <include reference="hv2-0p-pEH"/>
-                                            <include reference="d4d-BL-St3"/>
-                                            <include reference="vwh-M4-keR"/>
-                                        </mask>
-                                        <mask key="constraints">
-                                            <include reference="2X0-nh-dy9"/>
-                                            <include reference="FdR-Bd-uWA"/>
-                                            <include reference="RWP-vF-cXK"/>
-                                            <include reference="MUh-Wn-xBJ"/>
-                                            <include reference="mem-q8-O1P"/>
-                                            <include reference="A8t-bK-edn"/>
-                                            <include reference="NUu-d0-gEK"/>
-                                            <include reference="Zpj-az-bXf"/>
-                                            <include reference="xEo-Y6-pES"/>
-                                            <include reference="IB1-tt-DrN"/>
-                                            <include reference="g5w-i3-rjs"/>
-                                            <include reference="40a-yh-EOJ"/>
-                                            <include reference="MDY-AF-KA1"/>
-                                            <include reference="bDq-it-zGq"/>
-                                            <include reference="Kxr-zd-aJd"/>
-                                            <include reference="uEY-59-ZKc"/>
-                                            <include reference="uUg-1X-7Kg"/>
-                                        </mask>
-                                    </variation>
-                                </view>
-                                <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="149" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FKG-xS-HlM" customClass="CustomButton">
-                                    <rect key="frame" x="-23" y="-15" width="46" height="30"/>
-                                    <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
-                                    <constraints>
-                                        <constraint firstAttribute="width" relation="greaterThanOrEqual" constant="149" id="BNE-7a-kbD">
-                                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
-                                        </constraint>
-                                        <constraint firstAttribute="height" constant="30" id="vla-70-Jig">
-                                            <variation key="heightClass=regular-widthClass=compact" constant="50"/>
-                                        </constraint>
-                                    </constraints>
-                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                                    <state key="normal" title="선택" image="tp_01_img_btn_icon_ok">
-                                        <color key="titleColor" red="1" green="0.43137254899999999" blue="0.16862745100000001" alpha="1" colorSpace="calibratedRGB"/>
-                                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
-                                    </state>
-                                    <state key="highlighted">
-                                        <color key="titleColor" red="0.73601246840000001" green="0.3682315451" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
-                                    </state>
-                                    <variation key="default">
-                                        <mask key="constraints">
-                                            <exclude reference="BNE-7a-kbD"/>
-                                            <exclude reference="vla-70-Jig"/>
-                                        </mask>
-                                    </variation>
-                                    <variation key="heightClass=regular-widthClass=compact">
-                                        <mask key="constraints">
-                                            <include reference="BNE-7a-kbD"/>
-                                            <include reference="vla-70-Jig"/>
-                                        </mask>
-                                    </variation>
-                                    <connections>
-                                        <action selector="btnConfirmTouched:" destination="qLf-va-EAG" eventType="touchUpInside" id="JvU-lL-1vP"/>
-                                    </connections>
-                                </button>
-                                <button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="249" placeholderIntrinsicWidth="149" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="EtP-9O-R3A" customClass="CustomButton">
-                                    <rect key="frame" x="-23" y="-15" width="46" height="30"/>
-                                    <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
-                                    <constraints>
-                                        <constraint firstAttribute="height" constant="44" id="L9v-r3-6MJ">
-                                            <variation key="heightClass=regular-widthClass=compact" constant="50"/>
-                                        </constraint>
-                                    </constraints>
-                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
-                                    <state key="normal" title="취소" image="tp_01_img_btn_icon_cencel">
-                                        <color key="titleColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
-                                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
-                                    </state>
-                                    <variation key="default">
-                                        <mask key="constraints">
-                                            <exclude reference="L9v-r3-6MJ"/>
-                                        </mask>
-                                    </variation>
-                                    <variation key="heightClass=regular-widthClass=compact">
-                                        <mask key="constraints">
-                                            <exclude reference="L9v-r3-6MJ"/>
-                                        </mask>
-                                    </variation>
-                                    <connections>
-                                        <action selector="btnCancelTouched:" destination="qLf-va-EAG" eventType="touchUpInside" id="g5k-Tn-E33"/>
-                                    </connections>
-                                </button>
-                            </subviews>
-                            <constraints>
-                                <constraint firstItem="FKG-xS-HlM" firstAttribute="top" secondItem="Mw5-GF-3oQ" secondAttribute="bottom" constant="1" id="99O-VT-gxI">
-                                    <variation key="heightClass=regular-widthClass=compact" constant="1"/>
-                                </constraint>
-                                <constraint firstItem="EtP-9O-R3A" firstAttribute="leading" secondItem="FKG-xS-HlM" secondAttribute="trailing" constant="1" id="Dh8-ss-mye">
-                                    <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
-                                </constraint>
-                                <constraint firstItem="EtP-9O-R3A" firstAttribute="top" secondItem="FKG-xS-HlM" secondAttribute="top" id="Iwk-Wx-inS"/>
-                                <constraint firstAttribute="trailing" secondItem="EtP-9O-R3A" secondAttribute="trailing" id="PVc-xe-kjg"/>
-                                <constraint firstAttribute="trailing" secondItem="7nf-Ia-7Kq" secondAttribute="trailing" id="QFZ-sI-FTg"/>
-                                <constraint firstItem="Mw5-GF-3oQ" firstAttribute="leading" secondItem="3Np-sH-ysD" secondAttribute="leading" id="RFN-Kf-txX"/>
-                                <constraint firstItem="7nf-Ia-7Kq" firstAttribute="top" secondItem="3Np-sH-ysD" secondAttribute="top" id="SU0-8W-BVB">
-                                    <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
-                                </constraint>
-                                <constraint firstItem="FKG-xS-HlM" firstAttribute="height" secondItem="EtP-9O-R3A" secondAttribute="height" id="TYM-Q2-0Li"/>
-                                <constraint firstItem="Mw5-GF-3oQ" firstAttribute="centerY" secondItem="3Np-sH-ysD" secondAttribute="centerY" id="UWf-rC-hV7">
-                                    <variation key="heightClass=regular-widthClass=compact" constant="6.5"/>
-                                </constraint>
-                                <constraint firstItem="7nf-Ia-7Kq" firstAttribute="trailing" secondItem="Mw5-GF-3oQ" secondAttribute="trailing" id="fbA-Cy-O1e"/>
-                                <constraint firstItem="Mw5-GF-3oQ" firstAttribute="top" secondItem="7nf-Ia-7Kq" secondAttribute="bottom" constant="1" id="hfD-i1-Fhe"/>
-                                <constraint firstItem="7nf-Ia-7Kq" firstAttribute="leading" secondItem="3Np-sH-ysD" secondAttribute="leading" id="j4G-mB-NeU"/>
-                                <constraint firstItem="FKG-xS-HlM" firstAttribute="leading" secondItem="3Np-sH-ysD" secondAttribute="leading" constant="1" id="jPE-IN-J3d">
-                                    <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
-                                </constraint>
-                                <constraint firstItem="FKG-xS-HlM" firstAttribute="width" secondItem="EtP-9O-R3A" secondAttribute="width" id="l68-2f-eQP"/>
-                                <constraint firstAttribute="bottom" secondItem="EtP-9O-R3A" secondAttribute="bottom" id="qno-Zg-Z7W">
-                                    <variation key="heightClass=regular-widthClass=compact" constant="1"/>
-                                </constraint>
-                            </constraints>
-                            <variation key="default">
-                                <mask key="subviews">
-                                    <exclude reference="7nf-Ia-7Kq"/>
-                                    <exclude reference="Mw5-GF-3oQ"/>
-                                    <exclude reference="FKG-xS-HlM"/>
-                                    <exclude reference="EtP-9O-R3A"/>
-                                </mask>
-                                <mask key="constraints">
-                                    <exclude reference="Dh8-ss-mye"/>
-                                    <exclude reference="Iwk-Wx-inS"/>
-                                    <exclude reference="PVc-xe-kjg"/>
-                                    <exclude reference="qno-Zg-Z7W"/>
-                                    <exclude reference="99O-VT-gxI"/>
-                                    <exclude reference="TYM-Q2-0Li"/>
-                                    <exclude reference="jPE-IN-J3d"/>
-                                    <exclude reference="l68-2f-eQP"/>
-                                    <exclude reference="QFZ-sI-FTg"/>
-                                    <exclude reference="SU0-8W-BVB"/>
-                                    <exclude reference="fbA-Cy-O1e"/>
-                                    <exclude reference="j4G-mB-NeU"/>
-                                    <exclude reference="RFN-Kf-txX"/>
-                                    <exclude reference="UWf-rC-hV7"/>
-                                    <exclude reference="hfD-i1-Fhe"/>
-                                </mask>
-                            </variation>
-                            <variation key="heightClass=regular-widthClass=compact">
-                                <mask key="subviews">
-                                    <include reference="7nf-Ia-7Kq"/>
-                                    <include reference="Mw5-GF-3oQ"/>
-                                    <include reference="FKG-xS-HlM"/>
-                                    <include reference="EtP-9O-R3A"/>
-                                </mask>
-                                <mask key="constraints">
-                                    <include reference="Dh8-ss-mye"/>
-                                    <include reference="Iwk-Wx-inS"/>
-                                    <include reference="PVc-xe-kjg"/>
-                                    <exclude reference="qno-Zg-Z7W"/>
-                                    <include reference="99O-VT-gxI"/>
-                                    <include reference="TYM-Q2-0Li"/>
-                                    <include reference="jPE-IN-J3d"/>
-                                    <include reference="l68-2f-eQP"/>
-                                    <include reference="QFZ-sI-FTg"/>
-                                    <include reference="SU0-8W-BVB"/>
-                                    <include reference="fbA-Cy-O1e"/>
-                                    <include reference="j4G-mB-NeU"/>
-                                    <include reference="RFN-Kf-txX"/>
-                                    <include reference="UWf-rC-hV7"/>
-                                    <include reference="hfD-i1-Fhe"/>
-                                </mask>
-                            </variation>
-                        </view>
-                    </subviews>
-                    <constraints>
-                        <constraint firstAttribute="bottom" secondItem="3Np-sH-ysD" secondAttribute="bottom" constant="1" id="4tu-Yz-TS5">
-                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
-                        </constraint>
-                        <constraint firstItem="3Np-sH-ysD" firstAttribute="top" secondItem="sqq-aQ-dqD" secondAttribute="top" constant="1" id="CFR-Ui-y7e"/>
-                        <constraint firstItem="BBA-T0-3ew" firstAttribute="top" secondItem="sqq-aQ-dqD" secondAttribute="top" id="FTn-6G-KRE"/>
-                        <constraint firstAttribute="trailing" secondItem="3Np-sH-ysD" secondAttribute="trailing" constant="66" id="SmO-lm-bHQ">
-                            <variation key="heightClass=regular-widthClass=compact" constant="1"/>
-                        </constraint>
-                        <constraint firstAttribute="trailing" secondItem="BBA-T0-3ew" secondAttribute="trailing" id="UX9-gv-QnA"/>
-                        <constraint firstItem="BBA-T0-3ew" firstAttribute="leading" secondItem="sqq-aQ-dqD" secondAttribute="leading" id="ZUP-VE-DxS"/>
-                        <constraint firstItem="3Np-sH-ysD" firstAttribute="leading" secondItem="sqq-aQ-dqD" secondAttribute="leading" constant="66" id="feN-Ai-BHU">
-                            <variation key="heightClass=regular-widthClass=compact" constant="1"/>
-                        </constraint>
-                        <constraint firstAttribute="bottom" secondItem="BBA-T0-3ew" secondAttribute="bottom" id="s5b-nq-cj8"/>
-                    </constraints>
-                    <variation key="default">
-                        <mask key="subviews">
-                            <exclude reference="BBA-T0-3ew"/>
-                            <exclude reference="3Np-sH-ysD"/>
-                        </mask>
-                        <mask key="constraints">
-                            <exclude reference="4tu-Yz-TS5"/>
-                            <exclude reference="CFR-Ui-y7e"/>
-                            <exclude reference="SmO-lm-bHQ"/>
-                            <exclude reference="feN-Ai-BHU"/>
-                            <exclude reference="FTn-6G-KRE"/>
-                            <exclude reference="UX9-gv-QnA"/>
-                            <exclude reference="ZUP-VE-DxS"/>
-                            <exclude reference="s5b-nq-cj8"/>
-                        </mask>
-                    </variation>
-                    <variation key="heightClass=regular-widthClass=compact">
-                        <mask key="subviews">
-                            <include reference="BBA-T0-3ew"/>
-                            <include reference="3Np-sH-ysD"/>
-                        </mask>
-                        <mask key="constraints">
-                            <include reference="4tu-Yz-TS5"/>
-                            <include reference="CFR-Ui-y7e"/>
-                            <include reference="SmO-lm-bHQ"/>
-                            <include reference="feN-Ai-BHU"/>
-                            <include reference="FTn-6G-KRE"/>
-                            <include reference="UX9-gv-QnA"/>
-                            <include reference="ZUP-VE-DxS"/>
-                            <include reference="s5b-nq-cj8"/>
-                        </mask>
-                    </variation>
-                </view>
-            </subviews>
-            <constraints>
-                <constraint firstAttribute="centerX" secondItem="4c3-gb-BwR" secondAttribute="centerX" id="0tG-Bd-2ic"/>
-                <constraint firstAttribute="trailing" secondItem="4c3-gb-BwR" secondAttribute="trailing" id="F9j-6m-8Sq"/>
-                <constraint firstAttribute="centerY" secondItem="4c3-gb-BwR" secondAttribute="centerY" id="JX5-Sx-hSJ"/>
-                <constraint firstItem="4c3-gb-BwR" firstAttribute="trailing" secondItem="sqq-aQ-dqD" secondAttribute="trailing" constant="26" id="SNd-cf-17Y">
-                    <variation key="heightClass=regular-widthClass=compact" constant="10"/>
-                </constraint>
-                <constraint firstItem="4c3-gb-BwR" firstAttribute="top" secondItem="qLf-va-EAG" secondAttribute="top" id="TOG-yL-xSq"/>
-                <constraint firstItem="sqq-aQ-dqD" firstAttribute="leading" secondItem="4c3-gb-BwR" secondAttribute="leading" constant="25" id="jNe-AH-9q0">
-                    <variation key="heightClass=regular-widthClass=compact" constant="10"/>
-                </constraint>
-                <constraint firstAttribute="centerY" secondItem="sqq-aQ-dqD" secondAttribute="centerY" constant="12" id="rPN-2q-9iB">
-                    <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
-                </constraint>
-                <constraint firstAttribute="bottom" secondItem="4c3-gb-BwR" secondAttribute="bottom" id="uc7-M6-ZYJ"/>
-                <constraint firstItem="4c3-gb-BwR" firstAttribute="leading" secondItem="qLf-va-EAG" secondAttribute="leading" id="wPB-Gl-TgQ"/>
-            </constraints>
-            <simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
-            <variation key="default">
-                <mask key="subviews">
-                    <exclude reference="4c3-gb-BwR"/>
-                    <exclude reference="sqq-aQ-dqD"/>
-                </mask>
-                <mask key="constraints">
-                    <exclude reference="0tG-Bd-2ic"/>
-                    <exclude reference="F9j-6m-8Sq"/>
-                    <exclude reference="JX5-Sx-hSJ"/>
-                    <exclude reference="SNd-cf-17Y"/>
-                    <exclude reference="TOG-yL-xSq"/>
-                    <exclude reference="uc7-M6-ZYJ"/>
-                    <exclude reference="wPB-Gl-TgQ"/>
-                    <exclude reference="jNe-AH-9q0"/>
-                    <exclude reference="rPN-2q-9iB"/>
-                </mask>
-            </variation>
-            <variation key="heightClass=regular-widthClass=compact">
-                <mask key="subviews">
-                    <include reference="4c3-gb-BwR"/>
-                    <include reference="sqq-aQ-dqD"/>
-                </mask>
-                <mask key="constraints">
-                    <include reference="0tG-Bd-2ic"/>
-                    <include reference="F9j-6m-8Sq"/>
-                    <include reference="JX5-Sx-hSJ"/>
-                    <include reference="SNd-cf-17Y"/>
-                    <include reference="TOG-yL-xSq"/>
-                    <include reference="uc7-M6-ZYJ"/>
-                    <include reference="wPB-Gl-TgQ"/>
-                    <include reference="jNe-AH-9q0"/>
-                    <include reference="rPN-2q-9iB"/>
-                </mask>
-            </variation>
-            <connections>
-                <outlet property="btnCancel" destination="EtP-9O-R3A" id="mr5-zY-bQM"/>
-                <outlet property="btnConfirm" destination="FKG-xS-HlM" id="zTF-29-eYq"/>
-                <outlet property="btnLocation" destination="nWb-bx-Pvy" id="jVy-L3-FS1"/>
-                <outlet property="constraintBtnConfirmWidth" destination="BNE-7a-kbD" id="C9m-XW-2MO"/>
-                <outlet property="constraintBtnSameWidth" destination="l68-2f-eQP" id="T6v-Ip-LLE"/>
-                <outlet property="controlContainerView" destination="NWf-cu-R3j" id="81X-35-SuJ"/>
-                <outlet property="lblDesc" destination="vwh-M4-keR" id="NU4-Ol-5rG"/>
-                <outlet property="lblHeat" destination="XSH-Sr-Fqu" id="bnY-Os-Z4j"/>
-                <outlet property="lblTitle" destination="IE2-24-gHl" id="DFB-ut-ky2"/>
-                <outlet property="lblUnit" destination="pm6-ia-6LC" id="mvR-fH-W57"/>
-                <outlet property="maskingView" destination="4c3-gb-BwR" id="jsi-Mz-Cjp"/>
-                <outlet property="popUpView" destination="sqq-aQ-dqD" id="BCO-MT-Cf2"/>
-                <outlet property="rdoOver" destination="hv2-0p-pEH" id="TjZ-xy-5IZ"/>
-                <outlet property="rdoUnder" destination="d4d-BL-St3" id="jGC-lq-fnP"/>
-            </connections>
-            <point key="canvasLocation" x="90" y="348"/>
-        </view>
-    </objects>
-    <resources>
-        <image name="common_radiobox_checked" width="25" height="25"/>
-        <image name="common_radiobox_default" width="25" height="25"/>
-        <image name="tp_01_img_btn_icon_cencel" width="30" height="50"/>
-        <image name="tp_01_img_btn_icon_ok" width="30" height="50"/>
-        <image name="tp_01_img_selectbox_bg" width="71" height="32"/>
-        <image name="tp_01_img_selectbox_bg_press" width="71" height="32"/>
-    </resources>
-</document>

+ 109 - 0
kneet2/Classes/CommonUI/WeatherLocationPopupTableViewCell.xib

@@ -0,0 +1,109 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9060" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <tableViewCell clipsSubviews="YES" contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="LocationCellIdentifier" rowHeight="95" id="iyt-NC-2Eb" customClass="WeatherLocationPopupTableViewCell">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="95"/>
+            <autoresizingMask key="autoresizingMask"/>
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="iyt-NC-2Eb" id="aYc-Bf-Bll">
+                <rect key="frame" x="0.0" y="0.0" width="320" height="94"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ta5-rk-3gu" customClass="CustomLabel">
+                        <rect key="frame" x="-42" y="-21" width="42" height="21"/>
+                        <animations/>
+                        <constraints>
+                            <constraint firstAttribute="height" constant="20" id="GyN-Jp-K6Q"/>
+                        </constraints>
+                        <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                        <color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
+                        <nil key="highlightedColor"/>
+                        <variation key="default">
+                            <mask key="constraints">
+                                <exclude reference="GyN-Jp-K6Q"/>
+                            </mask>
+                        </variation>
+                        <variation key="heightClass=regular-widthClass=compact">
+                            <mask key="constraints">
+                                <include reference="GyN-Jp-K6Q"/>
+                            </mask>
+                        </variation>
+                    </label>
+                    <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="25" placeholderIntrinsicHeight="25" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="0Hd-xB-gzI" userLabel="Button-radio" customClass="CustomRadioButton">
+                        <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                        <animations/>
+                        <constraints>
+                            <constraint firstAttribute="width" constant="25" id="KYp-Jo-J2N"/>
+                            <constraint firstAttribute="height" constant="25" id="g4q-rC-GcE"/>
+                        </constraints>
+                        <state key="normal" image="common_radiobox_default">
+                            <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                        </state>
+                        <state key="highlighted" image="common_radiobox_checked"/>
+                        <variation key="default">
+                            <mask key="constraints">
+                                <exclude reference="KYp-Jo-J2N"/>
+                                <exclude reference="g4q-rC-GcE"/>
+                            </mask>
+                        </variation>
+                        <variation key="heightClass=regular-widthClass=compact">
+                            <mask key="constraints">
+                                <include reference="KYp-Jo-J2N"/>
+                                <include reference="g4q-rC-GcE"/>
+                            </mask>
+                        </variation>
+                    </button>
+                </subviews>
+                <animations/>
+                <constraints>
+                    <constraint firstItem="Ta5-rk-3gu" firstAttribute="top" secondItem="aYc-Bf-Bll" secondAttribute="top" constant="36" id="AyV-lM-KiF"/>
+                    <constraint firstItem="0Hd-xB-gzI" firstAttribute="top" secondItem="aYc-Bf-Bll" secondAttribute="top" constant="33" id="IOf-5m-JLW"/>
+                    <constraint firstItem="Ta5-rk-3gu" firstAttribute="leading" secondItem="aYc-Bf-Bll" secondAttribute="leading" constant="15" id="bSY-k0-DZf"/>
+                    <constraint firstItem="0Hd-xB-gzI" firstAttribute="leading" secondItem="Ta5-rk-3gu" secondAttribute="trailing" constant="15" id="h8I-ce-732"/>
+                    <constraint firstAttribute="trailing" secondItem="0Hd-xB-gzI" secondAttribute="trailing" constant="15" id="lYV-fY-U7q"/>
+                </constraints>
+                <variation key="default">
+                    <mask key="subviews">
+                        <exclude reference="Ta5-rk-3gu"/>
+                        <exclude reference="0Hd-xB-gzI"/>
+                    </mask>
+                    <mask key="constraints">
+                        <exclude reference="AyV-lM-KiF"/>
+                        <exclude reference="bSY-k0-DZf"/>
+                        <exclude reference="IOf-5m-JLW"/>
+                        <exclude reference="h8I-ce-732"/>
+                        <exclude reference="lYV-fY-U7q"/>
+                    </mask>
+                </variation>
+                <variation key="heightClass=regular-widthClass=compact">
+                    <mask key="subviews">
+                        <include reference="Ta5-rk-3gu"/>
+                        <include reference="0Hd-xB-gzI"/>
+                    </mask>
+                    <mask key="constraints">
+                        <include reference="AyV-lM-KiF"/>
+                        <include reference="bSY-k0-DZf"/>
+                        <include reference="IOf-5m-JLW"/>
+                        <include reference="h8I-ce-732"/>
+                        <include reference="lYV-fY-U7q"/>
+                    </mask>
+                </variation>
+            </tableViewCellContentView>
+            <animations/>
+            <connections>
+                <outlet property="lblCity" destination="Ta5-rk-3gu" id="GR2-DP-Igr"/>
+                <outlet property="rdoSelect" destination="0Hd-xB-gzI" id="aJP-PY-jpq"/>
+            </connections>
+            <point key="canvasLocation" x="250" y="359.5"/>
+        </tableViewCell>
+    </objects>
+    <resources>
+        <image name="common_radiobox_checked" width="25" height="25"/>
+        <image name="common_radiobox_default" width="25" height="25"/>
+    </resources>
+</document>

+ 38 - 0
kneet2/Classes/CommonUI/WeatherLocationPopupView.h

@@ -0,0 +1,38 @@
+//
+//  WeatherLocationPopupView.h
+//  kneet2
+//
+//  Created by Jason Lee on 11/24/15.
+//  Copyright (c) 2015 ntels. All rights reserved.
+//
+
+@import UIKit;
+#import "CustomAlertView.h"
+#import "JDViewController.h"
+
+@class CommonCode;
+
+@class CustomImageView;
+@class CustomCheckBox;
+@class CustomRadioButton;
+
+@interface WeatherLocationPopupView : CustomAlertView
+
+@property (weak, nonatomic) CommonCode *weatherLocation;
+@property (weak, nonatomic) NSArray<CommonCode> *locations;
+@property (strong, nonatomic) NSString *typeCode;
+
+@property (weak, nonatomic) IBOutlet CustomTableView *tableView;
+
+
+- (id)initFromNib;
+
+@end
+
+
+@interface WeatherLocationPopupTableViewCell : KNTableViewCell
+
+@property (weak, nonatomic) IBOutlet CustomLabel *lblCity;
+@property (weak, nonatomic) IBOutlet CustomRadioButton *rdoSelect;
+
+@end

+ 158 - 0
kneet2/Classes/CommonUI/WeatherLocationPopupView.m

@@ -0,0 +1,158 @@
+//
+//  WeatherLocationPopupView.m
+//  kneet2
+//
+//  Created by Jason Lee on 11/3/15.
+//  Copyright (c) 2015 ntels. All rights reserved.
+//
+#import "JDObject.h"
+
+#import "RequestHandler.h"
+#import "JDJSONModel.h"
+
+#import "CustomLabel.h"
+#import "CustomTableView.h"
+#import "CustomButton.h"
+#import "CustomRadioGroup.h"
+#import "ImageUtil.h"
+
+#import "WeatherLocationPopupView.h"
+
+@implementation WeatherLocationPopupTableViewCell
+
+@end
+
+@interface WeatherLocationPopupView () <UITableViewDataSource, UITableViewDelegate> {
+    
+    CustomRadioReusableGroup *_rgroup;
+    BOOL _isNotFirstLoading;
+    UIImage *_bgCellImage1, *_bgCellImage2;
+    
+    NSMutableArray<ItemModel> *_checkedDevices;
+}
+
+@end
+
+@implementation WeatherLocationPopupView
+
+- (id)initFromNib {
+
+    for (UIView *view in [CommonUtil nibViews:@"WeatherLocationPopupView"]) {
+        if ([view isKindOfClass:[WeatherLocationPopupView class]]) {
+            self = (WeatherLocationPopupView *)view;
+
+            //XIB의 경우, 현재 화면 사이즈로 맞춰줘야 함.
+            self.frame = [UIScreen mainScreen].bounds;
+            
+            [self initTableViewAsDefaultStyle:_tableView];
+            
+            UINib *nib = [UINib nibWithNibName:@"WeatherLocationPopupTableViewCell" bundle:nil];
+            [_tableView registerNib:nib forCellReuseIdentifier:@"LocationCellIdentifier"];
+            
+            //set radio group
+            _rgroup = [[CustomRadioReusableGroup alloc] init];
+            _rgroup.tableView = _tableView;
+            
+            //Localization
+            [self.btnConfirm setTitle:NSLocalizedString(@"확인", @"확인") forState:UIControlStateNormal];
+            [self.btnCancel setTitle:NSLocalizedString(@"취소", @"취소") forState:UIControlStateNormal];
+            
+            UIEdgeInsets insets = UIEdgeInsetsMake(4, 4, 4, 4);
+            _bgCellImage1 = [ImageUtil resizableImageWithCapInsets:insets resizingMode:UIImageResizingModeStretch img:[UIImage imageNamed:@"tp_01_img_list_bg_01"]];
+            _bgCellImage2 = [ImageUtil resizableImageWithCapInsets:insets resizingMode:UIImageResizingModeStretch img:[UIImage imageNamed:@"tp_01_img_list_bg_02"]];
+        }
+    }
+
+    return self;
+}
+
+- (void)initTableViewAsDefaultStyle:(CustomTableView *)tableView {
+    tableView.dataSource = self;
+    tableView.delegate = self;
+    
+    tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
+    tableView.backgroundColor = [UIColor clearColor];
+    
+    tableView.tableFooterView = [[UIView alloc] init]; //this call table events;
+}
+
+- (void)didMoveToSuperview {
+
+}
+
+- (CommonCode *)weatherLocation {
+    return _rgroup.valueForChecked;
+}
+
+#pragma mark - Main Logic
+
+
+#pragma mark - UITableView DataSource & Delegate
+- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
+    return 1;
+}
+
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
+    return _locations ? _locations.count : 0;
+}
+
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
+    CGFloat height = 95.0f;
+    
+    return height;
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+    CommonCode *code = _locations[indexPath.row];
+    
+    WeatherLocationPopupTableViewCell *tcell = (WeatherLocationPopupTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"LocationCellIdentifier"];
+    tcell.lblCity.text = code.commonCodeName;
+    
+        
+    tcell.rdoSelect.value = code;
+    if (indexPath.row == 0 && !_isNotFirstLoading) {
+        _isNotFirstLoading = YES;
+        tcell.rdoSelect.checked = YES;
+    } else {
+        tcell.rdoSelect.checked = [tcell.rdoSelect getRadioStatusFromValue];
+    }
+    
+    [_rgroup addRadioButton:tcell.rdoSelect];
+    
+    return tcell;
+}
+
+- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
+    [tableView deselectRowAtIndexPath:indexPath animated:YES];
+    
+    WeatherLocationPopupTableViewCell *tcell = (WeatherLocationPopupTableViewCell *)[self tableView:tableView cellForRowAtIndexPath:indexPath];
+    [_rgroup someRadioButtonTouched:tcell.rdoSelect];
+    
+    [_tableView reloadData];
+}
+
+
+- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+    // Remove seperator inset
+    if ([cell respondsToSelector:@selector(setSeparatorInset:)]) {
+        [cell setSeparatorInset:UIEdgeInsetsZero];
+    }
+    
+    // Prevent the cell from inheriting the Table View's margin settings
+    if ([cell respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)]) {
+        [cell setPreservesSuperviewLayoutMargins:NO];
+    }
+    
+    // Explictly set your cell's layout margins
+    if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
+        [cell setLayoutMargins:UIEdgeInsetsZero];
+    }
+}
+
+
+#pragma mark - UI Events
+
+
+@end

+ 412 - 0
kneet2/Classes/CommonUI/WeatherLocationPopupView.xib

@@ -0,0 +1,412 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9060" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="qLf-va-EAG" customClass="WeatherLocationPopupView">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <view alpha="0.29999999999999999" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4c3-gb-BwR" userLabel="maskView">
+                    <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                    <animations/>
+                    <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
+                </view>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sqq-aQ-dqD" userLabel="popUpView">
+                    <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                    <subviews>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3Np-sH-ysD" userLabel="ContainerView">
+                            <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                            <subviews>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7nf-Ia-7Kq" userLabel="View - Title">
+                                    <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                                    <subviews>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="기준 지역" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IE2-24-gHl" customClass="CustomLabel">
+                                            <rect key="frame" x="0.0" y="-21" width="42" height="21"/>
+                                            <animations/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="64" id="gmY-Rb-Qao"/>
+                                            </constraints>
+                                            <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
+                                            <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                            <nil key="highlightedColor"/>
+                                            <variation key="default">
+                                                <mask key="constraints">
+                                                    <exclude reference="gmY-Rb-Qao"/>
+                                                </mask>
+                                            </variation>
+                                            <variation key="heightClass=regular-widthClass=compact">
+                                                <mask key="constraints">
+                                                    <include reference="gmY-Rb-Qao"/>
+                                                </mask>
+                                            </variation>
+                                        </label>
+                                    </subviews>
+                                    <animations/>
+                                    <color key="backgroundColor" red="0.95686274510000002" green="0.30588235289999999" blue="0.3294117647" alpha="1" colorSpace="calibratedRGB"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="44" id="1fj-XN-uH0">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="64"/>
+                                        </constraint>
+                                        <constraint firstItem="IE2-24-gHl" firstAttribute="leading" secondItem="7nf-Ia-7Kq" secondAttribute="leading" id="98Q-bq-Oq7">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="20"/>
+                                        </constraint>
+                                        <constraint firstItem="IE2-24-gHl" firstAttribute="top" secondItem="7nf-Ia-7Kq" secondAttribute="top" id="Ldj-nV-yrM">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                                        </constraint>
+                                        <constraint firstAttribute="trailing" secondItem="IE2-24-gHl" secondAttribute="trailing" id="mUY-4l-GjT">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="-8"/>
+                                        </constraint>
+                                        <constraint firstAttribute="bottom" secondItem="IE2-24-gHl" secondAttribute="bottom" id="yzV-EQ-HeM">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                                        </constraint>
+                                    </constraints>
+                                    <variation key="default">
+                                        <mask key="subviews">
+                                            <exclude reference="IE2-24-gHl"/>
+                                        </mask>
+                                        <mask key="constraints">
+                                            <exclude reference="1fj-XN-uH0"/>
+                                            <exclude reference="98Q-bq-Oq7"/>
+                                            <exclude reference="Ldj-nV-yrM"/>
+                                            <exclude reference="mUY-4l-GjT"/>
+                                            <exclude reference="yzV-EQ-HeM"/>
+                                        </mask>
+                                    </variation>
+                                    <variation key="heightClass=regular-widthClass=compact">
+                                        <mask key="subviews">
+                                            <include reference="IE2-24-gHl"/>
+                                        </mask>
+                                        <mask key="constraints">
+                                            <exclude reference="1fj-XN-uH0"/>
+                                            <include reference="98Q-bq-Oq7"/>
+                                            <include reference="Ldj-nV-yrM"/>
+                                            <include reference="mUY-4l-GjT"/>
+                                            <include reference="yzV-EQ-HeM"/>
+                                        </mask>
+                                    </variation>
+                                </view>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Mw5-GF-3oQ" userLabel="View - message">
+                                    <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                                    <subviews>
+                                        <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="95" sectionHeaderHeight="28" sectionFooterHeight="28" translatesAutoresizingMaskIntoConstraints="NO" id="cee-tl-kl3" customClass="CustomTableView">
+                                            <rect key="frame" x="0.0" y="0.0" width="240" height="128"/>
+                                            <animations/>
+                                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="285" id="yne-jW-8qK"/>
+                                            </constraints>
+                                            <variation key="default">
+                                                <mask key="constraints">
+                                                    <exclude reference="yne-jW-8qK"/>
+                                                </mask>
+                                            </variation>
+                                            <variation key="heightClass=regular-widthClass=compact">
+                                                <mask key="constraints">
+                                                    <include reference="yne-jW-8qK"/>
+                                                </mask>
+                                            </variation>
+                                        </tableView>
+                                    </subviews>
+                                    <animations/>
+                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                    <constraints>
+                                        <constraint firstAttribute="bottom" secondItem="cee-tl-kl3" secondAttribute="bottom" id="Raf-LN-Jo9"/>
+                                        <constraint firstItem="cee-tl-kl3" firstAttribute="top" secondItem="Mw5-GF-3oQ" secondAttribute="top" id="etS-lK-TEZ"/>
+                                        <constraint firstItem="cee-tl-kl3" firstAttribute="leading" secondItem="Mw5-GF-3oQ" secondAttribute="leading" id="jhl-vp-Sni"/>
+                                        <constraint firstAttribute="trailing" secondItem="cee-tl-kl3" secondAttribute="trailing" id="wlO-DH-OgT"/>
+                                    </constraints>
+                                    <variation key="default">
+                                        <mask key="subviews">
+                                            <exclude reference="cee-tl-kl3"/>
+                                        </mask>
+                                        <mask key="constraints">
+                                            <exclude reference="Raf-LN-Jo9"/>
+                                            <exclude reference="etS-lK-TEZ"/>
+                                            <exclude reference="jhl-vp-Sni"/>
+                                            <exclude reference="wlO-DH-OgT"/>
+                                        </mask>
+                                    </variation>
+                                    <variation key="heightClass=regular-widthClass=compact">
+                                        <mask key="subviews">
+                                            <include reference="cee-tl-kl3"/>
+                                        </mask>
+                                        <mask key="constraints">
+                                            <include reference="Raf-LN-Jo9"/>
+                                            <include reference="etS-lK-TEZ"/>
+                                            <include reference="jhl-vp-Sni"/>
+                                            <include reference="wlO-DH-OgT"/>
+                                        </mask>
+                                    </variation>
+                                </view>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bIs-li-8bz" userLabel="View - Buttons">
+                                    <rect key="frame" x="-20" y="156" width="338" height="90"/>
+                                    <subviews>
+                                        <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="145" placeholderIntrinsicHeight="70" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FKG-xS-HlM" customClass="CustomButton">
+                                            <rect key="frame" x="20" y="20" width="149" height="50"/>
+                                            <animations/>
+                                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                            <constraints>
+                                                <constraint firstAttribute="width" relation="greaterThanOrEqual" id="BNE-7a-kbD"/>
+                                            </constraints>
+                                            <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                                            <state key="normal" title="확인">
+                                                <color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
+                                                <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                            </state>
+                                            <state key="highlighted">
+                                                <color key="titleColor" red="0.73601246840000001" green="0.3682315451" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
+                                            </state>
+                                            <variation key="default">
+                                                <mask key="constraints">
+                                                    <exclude reference="BNE-7a-kbD"/>
+                                                </mask>
+                                            </variation>
+                                            <variation key="heightClass=regular-widthClass=compact">
+                                                <mask key="constraints">
+                                                    <include reference="BNE-7a-kbD"/>
+                                                </mask>
+                                            </variation>
+                                            <connections>
+                                                <action selector="btnConfirmTouched:" destination="qLf-va-EAG" eventType="touchUpInside" id="JvU-lL-1vP"/>
+                                            </connections>
+                                        </button>
+                                        <button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="249" horizontalCompressionResistancePriority="749" placeholderIntrinsicWidth="144" placeholderIntrinsicHeight="70" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="EtP-9O-R3A" customClass="CustomButton">
+                                            <rect key="frame" x="170" y="20" width="148" height="50"/>
+                                            <animations/>
+                                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="44" id="L9v-r3-6MJ">
+                                                    <variation key="heightClass=regular-widthClass=compact" constant="50"/>
+                                                </constraint>
+                                            </constraints>
+                                            <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                                            <state key="normal" title="취소">
+                                                <color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
+                                                <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                            </state>
+                                            <variation key="default">
+                                                <mask key="constraints">
+                                                    <exclude reference="L9v-r3-6MJ"/>
+                                                </mask>
+                                            </variation>
+                                            <variation key="heightClass=regular-widthClass=compact">
+                                                <mask key="constraints">
+                                                    <exclude reference="L9v-r3-6MJ"/>
+                                                </mask>
+                                            </variation>
+                                            <connections>
+                                                <action selector="btnCancelTouched:" destination="qLf-va-EAG" eventType="touchUpInside" id="g5k-Tn-E33"/>
+                                            </connections>
+                                        </button>
+                                    </subviews>
+                                    <animations/>
+                                    <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                    <constraints>
+                                        <constraint firstItem="FKG-xS-HlM" firstAttribute="leading" secondItem="bIs-li-8bz" secondAttribute="leading" id="Fkf-og-ytd"/>
+                                        <constraint firstAttribute="trailing" secondItem="EtP-9O-R3A" secondAttribute="trailing" id="PjC-cB-YfR"/>
+                                        <constraint firstItem="FKG-xS-HlM" firstAttribute="top" secondItem="bIs-li-8bz" secondAttribute="top" constant="1" id="hu2-xM-w64"/>
+                                        <constraint firstAttribute="bottom" secondItem="FKG-xS-HlM" secondAttribute="bottom" id="l9l-jK-cst"/>
+                                        <constraint firstItem="EtP-9O-R3A" firstAttribute="width" secondItem="FKG-xS-HlM" secondAttribute="width" id="qJo-Xg-EhL">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="-1"/>
+                                        </constraint>
+                                        <constraint firstItem="EtP-9O-R3A" firstAttribute="leading" secondItem="FKG-xS-HlM" secondAttribute="trailing" constant="1" id="rpW-dL-KWs"/>
+                                        <constraint firstAttribute="bottom" secondItem="EtP-9O-R3A" secondAttribute="bottom" id="sQC-dK-bJs"/>
+                                        <constraint firstItem="EtP-9O-R3A" firstAttribute="top" secondItem="bIs-li-8bz" secondAttribute="top" constant="1" id="xsM-oo-x8a"/>
+                                    </constraints>
+                                    <variation key="default">
+                                        <mask key="constraints">
+                                            <exclude reference="Fkf-og-ytd"/>
+                                            <exclude reference="hu2-xM-w64"/>
+                                            <exclude reference="l9l-jK-cst"/>
+                                            <exclude reference="PjC-cB-YfR"/>
+                                            <exclude reference="qJo-Xg-EhL"/>
+                                            <exclude reference="rpW-dL-KWs"/>
+                                            <exclude reference="sQC-dK-bJs"/>
+                                            <exclude reference="xsM-oo-x8a"/>
+                                        </mask>
+                                    </variation>
+                                    <variation key="heightClass=regular-widthClass=compact">
+                                        <mask key="constraints">
+                                            <include reference="Fkf-og-ytd"/>
+                                            <include reference="hu2-xM-w64"/>
+                                            <include reference="l9l-jK-cst"/>
+                                            <include reference="PjC-cB-YfR"/>
+                                            <include reference="qJo-Xg-EhL"/>
+                                            <include reference="rpW-dL-KWs"/>
+                                            <include reference="sQC-dK-bJs"/>
+                                            <include reference="xsM-oo-x8a"/>
+                                        </mask>
+                                    </variation>
+                                </view>
+                            </subviews>
+                            <animations/>
+                            <constraints>
+                                <constraint firstAttribute="trailing" secondItem="7nf-Ia-7Kq" secondAttribute="trailing" id="QFZ-sI-FTg"/>
+                                <constraint firstItem="Mw5-GF-3oQ" firstAttribute="leading" secondItem="3Np-sH-ysD" secondAttribute="leading" id="RFN-Kf-txX"/>
+                                <constraint firstItem="7nf-Ia-7Kq" firstAttribute="top" secondItem="3Np-sH-ysD" secondAttribute="top" id="SU0-8W-BVB">
+                                    <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                                </constraint>
+                                <constraint firstItem="Mw5-GF-3oQ" firstAttribute="centerY" secondItem="3Np-sH-ysD" secondAttribute="centerY" id="UWf-rC-hV7">
+                                    <variation key="heightClass=regular-widthClass=compact" constant="-3.5"/>
+                                </constraint>
+                                <constraint firstAttribute="trailing" secondItem="bIs-li-8bz" secondAttribute="trailing" id="UaC-ap-Ulp"/>
+                                <constraint firstItem="7nf-Ia-7Kq" firstAttribute="trailing" secondItem="Mw5-GF-3oQ" secondAttribute="trailing" id="fbA-Cy-O1e"/>
+                                <constraint firstItem="Mw5-GF-3oQ" firstAttribute="top" secondItem="7nf-Ia-7Kq" secondAttribute="bottom" constant="1" id="hfD-i1-Fhe">
+                                    <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                                </constraint>
+                                <constraint firstItem="7nf-Ia-7Kq" firstAttribute="leading" secondItem="3Np-sH-ysD" secondAttribute="leading" id="j4G-mB-NeU"/>
+                                <constraint firstAttribute="bottom" secondItem="bIs-li-8bz" secondAttribute="bottom" id="oNC-iJ-Za7"/>
+                                <constraint firstItem="bIs-li-8bz" firstAttribute="leading" secondItem="3Np-sH-ysD" secondAttribute="leading" id="s6c-op-QFh"/>
+                                <constraint firstItem="bIs-li-8bz" firstAttribute="top" secondItem="Mw5-GF-3oQ" secondAttribute="bottom" id="wPf-du-0AV"/>
+                            </constraints>
+                            <variation key="default">
+                                <mask key="subviews">
+                                    <exclude reference="7nf-Ia-7Kq"/>
+                                    <exclude reference="Mw5-GF-3oQ"/>
+                                </mask>
+                                <mask key="constraints">
+                                    <exclude reference="UaC-ap-Ulp"/>
+                                    <exclude reference="oNC-iJ-Za7"/>
+                                    <exclude reference="s6c-op-QFh"/>
+                                    <exclude reference="wPf-du-0AV"/>
+                                    <exclude reference="QFZ-sI-FTg"/>
+                                    <exclude reference="SU0-8W-BVB"/>
+                                    <exclude reference="fbA-Cy-O1e"/>
+                                    <exclude reference="j4G-mB-NeU"/>
+                                    <exclude reference="RFN-Kf-txX"/>
+                                    <exclude reference="UWf-rC-hV7"/>
+                                    <exclude reference="hfD-i1-Fhe"/>
+                                </mask>
+                            </variation>
+                            <variation key="heightClass=regular-widthClass=compact">
+                                <mask key="subviews">
+                                    <include reference="7nf-Ia-7Kq"/>
+                                    <include reference="Mw5-GF-3oQ"/>
+                                </mask>
+                                <mask key="constraints">
+                                    <include reference="UaC-ap-Ulp"/>
+                                    <include reference="oNC-iJ-Za7"/>
+                                    <include reference="s6c-op-QFh"/>
+                                    <include reference="wPf-du-0AV"/>
+                                    <include reference="QFZ-sI-FTg"/>
+                                    <include reference="SU0-8W-BVB"/>
+                                    <include reference="fbA-Cy-O1e"/>
+                                    <include reference="j4G-mB-NeU"/>
+                                    <include reference="RFN-Kf-txX"/>
+                                    <include reference="UWf-rC-hV7"/>
+                                    <include reference="hfD-i1-Fhe"/>
+                                </mask>
+                            </variation>
+                        </view>
+                    </subviews>
+                    <animations/>
+                    <constraints>
+                        <constraint firstAttribute="bottom" secondItem="3Np-sH-ysD" secondAttribute="bottom" constant="1" id="4tu-Yz-TS5">
+                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                        </constraint>
+                        <constraint firstItem="3Np-sH-ysD" firstAttribute="top" secondItem="sqq-aQ-dqD" secondAttribute="top" constant="1" id="CFR-Ui-y7e">
+                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                        </constraint>
+                        <constraint firstAttribute="trailing" secondItem="3Np-sH-ysD" secondAttribute="trailing" constant="66" id="SmO-lm-bHQ">
+                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                        </constraint>
+                        <constraint firstItem="3Np-sH-ysD" firstAttribute="leading" secondItem="sqq-aQ-dqD" secondAttribute="leading" constant="66" id="feN-Ai-BHU">
+                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                        </constraint>
+                    </constraints>
+                    <variation key="default">
+                        <mask key="subviews">
+                            <exclude reference="3Np-sH-ysD"/>
+                        </mask>
+                        <mask key="constraints">
+                            <exclude reference="4tu-Yz-TS5"/>
+                            <exclude reference="CFR-Ui-y7e"/>
+                            <exclude reference="SmO-lm-bHQ"/>
+                            <exclude reference="feN-Ai-BHU"/>
+                        </mask>
+                    </variation>
+                    <variation key="heightClass=regular-widthClass=compact">
+                        <mask key="subviews">
+                            <include reference="3Np-sH-ysD"/>
+                        </mask>
+                        <mask key="constraints">
+                            <include reference="4tu-Yz-TS5"/>
+                            <include reference="CFR-Ui-y7e"/>
+                            <include reference="SmO-lm-bHQ"/>
+                            <include reference="feN-Ai-BHU"/>
+                        </mask>
+                    </variation>
+                </view>
+            </subviews>
+            <animations/>
+            <constraints>
+                <constraint firstAttribute="centerX" secondItem="4c3-gb-BwR" secondAttribute="centerX" id="0tG-Bd-2ic"/>
+                <constraint firstAttribute="trailing" secondItem="4c3-gb-BwR" secondAttribute="trailing" id="F9j-6m-8Sq"/>
+                <constraint firstAttribute="centerY" secondItem="4c3-gb-BwR" secondAttribute="centerY" id="JX5-Sx-hSJ"/>
+                <constraint firstItem="4c3-gb-BwR" firstAttribute="trailing" secondItem="sqq-aQ-dqD" secondAttribute="trailing" constant="26" id="SNd-cf-17Y">
+                    <variation key="heightClass=regular-widthClass=compact" constant="15"/>
+                </constraint>
+                <constraint firstItem="4c3-gb-BwR" firstAttribute="top" secondItem="qLf-va-EAG" secondAttribute="top" id="TOG-yL-xSq"/>
+                <constraint firstItem="sqq-aQ-dqD" firstAttribute="leading" secondItem="4c3-gb-BwR" secondAttribute="leading" constant="25" id="jNe-AH-9q0">
+                    <variation key="heightClass=regular-widthClass=compact" constant="15"/>
+                </constraint>
+                <constraint firstAttribute="centerY" secondItem="sqq-aQ-dqD" secondAttribute="centerY" constant="12" id="rPN-2q-9iB">
+                    <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                </constraint>
+                <constraint firstAttribute="bottom" secondItem="4c3-gb-BwR" secondAttribute="bottom" id="uc7-M6-ZYJ"/>
+                <constraint firstItem="4c3-gb-BwR" firstAttribute="leading" secondItem="qLf-va-EAG" secondAttribute="leading" id="wPB-Gl-TgQ"/>
+            </constraints>
+            <simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
+            <variation key="default">
+                <mask key="subviews">
+                    <exclude reference="4c3-gb-BwR"/>
+                    <exclude reference="sqq-aQ-dqD"/>
+                </mask>
+                <mask key="constraints">
+                    <exclude reference="0tG-Bd-2ic"/>
+                    <exclude reference="F9j-6m-8Sq"/>
+                    <exclude reference="JX5-Sx-hSJ"/>
+                    <exclude reference="SNd-cf-17Y"/>
+                    <exclude reference="TOG-yL-xSq"/>
+                    <exclude reference="uc7-M6-ZYJ"/>
+                    <exclude reference="wPB-Gl-TgQ"/>
+                    <exclude reference="jNe-AH-9q0"/>
+                    <exclude reference="rPN-2q-9iB"/>
+                </mask>
+            </variation>
+            <variation key="heightClass=regular-widthClass=compact">
+                <mask key="subviews">
+                    <include reference="4c3-gb-BwR"/>
+                    <include reference="sqq-aQ-dqD"/>
+                </mask>
+                <mask key="constraints">
+                    <include reference="0tG-Bd-2ic"/>
+                    <include reference="F9j-6m-8Sq"/>
+                    <include reference="JX5-Sx-hSJ"/>
+                    <include reference="SNd-cf-17Y"/>
+                    <include reference="TOG-yL-xSq"/>
+                    <include reference="uc7-M6-ZYJ"/>
+                    <include reference="wPB-Gl-TgQ"/>
+                    <include reference="jNe-AH-9q0"/>
+                    <include reference="rPN-2q-9iB"/>
+                </mask>
+            </variation>
+            <connections>
+                <outlet property="btnCancel" destination="EtP-9O-R3A" id="mr5-zY-bQM"/>
+                <outlet property="btnConfirm" destination="FKG-xS-HlM" id="zTF-29-eYq"/>
+                <outlet property="constraintBtnConfirmWidth" destination="BNE-7a-kbD" id="C9m-XW-2MO"/>
+                <outlet property="containerView" destination="3Np-sH-ysD" id="uJs-dG-r2k"/>
+                <outlet property="lblTitle" destination="IE2-24-gHl" id="DFB-ut-ky2"/>
+                <outlet property="maskingView" destination="4c3-gb-BwR" id="9bJ-5l-qJq"/>
+                <outlet property="popUpView" destination="sqq-aQ-dqD" id="BCO-MT-Cf2"/>
+                <outlet property="tableView" destination="cee-tl-kl3" id="aBa-eb-ReK"/>
+            </connections>
+            <point key="canvasLocation" x="87" y="297"/>
+        </view>
+    </objects>
+</document>

+ 5 - 1
kneet2/Classes/Model/ItemModel.h

@@ -38,7 +38,7 @@ typedef NS_ENUM(NSInteger, CmdClsType) {
 #define ksItemSubTypeCodeTimer      @"05"
 #define ksItemSubTypeCodeGeoFencing @"06"
 #define ksItemSubTypeCodeHeat       @"31"
-#define ksItemSubTypeCodeSun        @"32"
+#define ksItemSubTypeCodeDaylight   @"32"
 
 #define ksItemTypeCodeTrigger       @"01"
 #define ksItemTypeCodeAction        @"02"
@@ -50,6 +50,8 @@ typedef NS_ENUM(NSInteger, CmdClsType) {
 #define ksConditionSubTypeCodeHomeMode      @"02"
 #define ksConditionSubTypeCodeExternHeat    @"31"
 
+#define ksConditionTypeCode
+
 @protocol ItemModel;
 @protocol ItemSubModel;
 @protocol ModeModel;
@@ -158,6 +160,8 @@ typedef NS_ENUM(NSInteger, CmdClsType) {
 @property (strong, nonatomic) NSMutableArray<ModeModel> *modes;
 @property (strong, nonatomic) NSMutableArray<ItemSubModel> *pushes;
 @property (strong, nonatomic) NSMutableArray<ItemSubModel> *timers;
+@property (strong, nonatomic) NSMutableArray<ItemSubModel> *daylights;
+@property (strong, nonatomic) NSMutableArray<ItemSubModel> *heats;
 @property (strong, nonatomic) NSMutableArray<DeviceModel> *mobileDevices;
 
 //fuction

+ 3 - 0
kneet2/Classes/Model/ItemModel.m

@@ -49,6 +49,9 @@
 }
 
 - (NSString *)daysOfWeek {
+    if (_daysOfWeek) {
+        return _daysOfWeek;
+    }
 
     NSMutableString *days = [[NSMutableString alloc] init];
     if (_cmdclsValue && ![_cmdclsValue isEmptyString]) {

+ 39 - 40
kneet2/Classes/ViewControllers/RuelsScreens/RegisterCmdClsViewController.m

@@ -19,7 +19,6 @@
 
 #import "RegisterCmdClsViewController.h"
 #import "RegisterModeViewController.h"
-#import "RegisterTimerViewController.h"
 #import "CommandClassListPopupView.h"
 
 //tableview
@@ -231,40 +230,40 @@
 
         cell = tcell;
     } else if (indexPath.section == 2) {//activation
-        RegisterTriggerActivationTableViewCell *tcell = [tableView dequeueReusableCellWithIdentifier:@"ActivationCellIdentifier"];
-        if (!tcell) {
-            tcell = (RegisterTriggerActivationTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"ActivationCellIdentifier"];
-        }
-
-        if (![tcell.btnTriggerOption actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
-            [tcell.btnTriggerOption addTarget:self action:@selector(btnAddTriggerOptionTouched:) forControlEvents:UIControlEventTouchUpInside];
-        }
-
-        //이미지 전환
-        [tcell setTriggerOptionEnable:_sectionCount == 4];
-        cell = tcell;
+//        RegisterTriggerActivationTableViewCell *tcell = [tableView dequeueReusableCellWithIdentifier:@"ActivationCellIdentifier"];
+//        if (!tcell) {
+//            tcell = (RegisterTriggerActivationTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"ActivationCellIdentifier"];
+//        }
+//
+//        if (![tcell.btnTriggerOption actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
+//            [tcell.btnTriggerOption addTarget:self action:@selector(btnAddTriggerOptionTouched:) forControlEvents:UIControlEventTouchUpInside];
+//        }
+//
+//        //이미지 전환
+//        [tcell setTriggerOptionEnable:_sectionCount == 4];
+//        cell = tcell;
     } else if (indexPath.section == 3) {
-        RegisterContainerTableViewCell *tcell = (RegisterContainerTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"ContainerCellIdentifier"];
-
-        if (!_triggervc) {//트리거뷰를 로드함.
-            _triggervc = (RulesTriggerOptionViewController *)[CommonUtil instantiateViewControllerWithIdentifier:@"RulesTriggerOptionViewController" storyboardName:@"Rules"];
-            _triggervc.tmpItem = _tmpItem;
-
-            [self addChildViewController:_triggervc];
-            [_triggervc didMoveToParentViewController:self];
-
-            if ([self isViewLoaded] && tcell.triggerOptionContainer) {
-                [_triggervc beginAppearanceTransition:YES animated:NO];
-                [tcell.triggerOptionContainer addSubview:_triggervc.view];
-                [_triggervc endAppearanceTransition];
-                [_triggervc.view mas_makeConstraints:^(MASConstraintMaker *make) {
-                    make.size.mas_equalTo(tcell.triggerOptionContainer);
-                    make.center.equalTo(tcell.triggerOptionContainer);
-                }];
-            }
-        }
-
-        cell = tcell;
+//        RegisterContainerTableViewCell *tcell = (RegisterContainerTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"ContainerCellIdentifier"];
+//
+//        if (!_triggervc) {//트리거뷰를 로드함.
+//            _triggervc = (RulesTriggerOptionViewController *)[CommonUtil instantiateViewControllerWithIdentifier:@"RulesTriggerOptionViewController" storyboardName:@"Rules"];
+//            _triggervc.tmpItem = _tmpItem;
+//
+//            [self addChildViewController:_triggervc];
+//            [_triggervc didMoveToParentViewController:self];
+//
+//            if ([self isViewLoaded] && tcell.triggerOptionContainer) {
+//                [_triggervc beginAppearanceTransition:YES animated:NO];
+//                [tcell.triggerOptionContainer addSubview:_triggervc.view];
+//                [_triggervc endAppearanceTransition];
+//                [_triggervc.view mas_makeConstraints:^(MASConstraintMaker *make) {
+//                    make.size.mas_equalTo(tcell.triggerOptionContainer);
+//                    make.center.equalTo(tcell.triggerOptionContainer);
+//                }];
+//            }
+//        }
+//
+//        cell = tcell;
     }
 
     cell.selectionStyle = UITableViewCellSelectionStyleNone;
@@ -273,12 +272,12 @@
 
 - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
     [tableView deselectRowAtIndexPath:indexPath animated:YES];
-
-    if (indexPath.section == 2) {
-        RegisterTriggerActivationTableViewCell *tcell = (RegisterTriggerActivationTableViewCell *)[self tableView:tableView cellForRowAtIndexPath:indexPath];
-        [self btnAddTriggerOptionTouched:tcell.btnTriggerOption];
-    }
-    [_tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
+//
+//    if (indexPath.section == 2) {
+//        RegisterTriggerActivationTableViewCell *tcell = (RegisterTriggerActivationTableViewCell *)[self tableView:tableView cellForRowAtIndexPath:indexPath];
+//        [self btnAddTriggerOptionTouched:tcell.btnTriggerOption];
+//    }
+//    [_tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];
 }
 
 - (void)tableView:(UITableView *)tableView willDisplayCell:(RegisterCmdClsTableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {

+ 35 - 36
kneet2/Classes/ViewControllers/RuelsScreens/RegisterModeViewController.m

@@ -18,7 +18,6 @@
 #import "UIImageView+WebCache.h"
 #import "CustomButton.h"
 
-#import "RegisterTimerViewController.h"
 #import "PredefinedDeviceViewController.h"
 #import "ScenesRegisterViewController.h"
 
@@ -242,40 +241,40 @@
         [_rgroup addRadioButton:tcell.rdoSelect];
         cell = tcell;
     } else if (indexPath.section == 2) {//activation
-        RegisterTriggerActivationTableViewCell *tcell = [tableView dequeueReusableCellWithIdentifier:@"ActivationCellIdentifier" forIndexPath:indexPath];
-        if (!tcell) {
-            tcell = (RegisterTriggerActivationTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"ActivationCellIdentifier"];
-        }
-
-        if (![tcell.btnTriggerOption actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
-            [tcell.btnTriggerOption addTarget:self action:@selector(btnAddTriggerOptionTouched:) forControlEvents:UIControlEventTouchUpInside];
-        }
-
-        //이미지 전환
-        [tcell setTriggerOptionEnable:_sectionCount == 4];
-        cell = tcell;
+//        RegisterTriggerActivationTableViewCell *tcell = [tableView dequeueReusableCellWithIdentifier:@"ActivationCellIdentifier" forIndexPath:indexPath];
+//        if (!tcell) {
+//            tcell = (RegisterTriggerActivationTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"ActivationCellIdentifier"];
+//        }
+//
+//        if (![tcell.btnTriggerOption actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
+//            [tcell.btnTriggerOption addTarget:self action:@selector(btnAddTriggerOptionTouched:) forControlEvents:UIControlEventTouchUpInside];
+//        }
+//
+//        //이미지 전환
+//        [tcell setTriggerOptionEnable:_sectionCount == 4];
+//        cell = tcell;
     } else if (indexPath.section == 3) {
-        RegisterContainerTableViewCell *tcell = (RegisterContainerTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"ContainerCellIdentifier"];
-
-        if (!_triggervc) {//트리거뷰를 로드함.
-            _triggervc = (RulesTriggerOptionViewController *)[CommonUtil instantiateViewControllerWithIdentifier:@"RulesTriggerOptionViewController" storyboardName:@"Rules"];
-            _triggervc.tmpItem = _tmpItem;
-
-            [self addChildViewController:_triggervc];
-            [_triggervc didMoveToParentViewController:self];
-
-            if ([self isViewLoaded] && tcell.triggerOptionContainer) {
-                [_triggervc beginAppearanceTransition:YES animated:NO];
-                [tcell.triggerOptionContainer addSubview:_triggervc.view];
-                [_triggervc endAppearanceTransition];
-                [_triggervc.view mas_makeConstraints:^(MASConstraintMaker *make) {
-                    make.size.mas_equalTo(tcell.triggerOptionContainer);
-                    make.center.equalTo(tcell.triggerOptionContainer);
-                }];
-            }
-        }
-
-        cell = tcell;
+//        RegisterContainerTableViewCell *tcell = (RegisterContainerTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"ContainerCellIdentifier"];
+//
+//        if (!_triggervc) {//트리거뷰를 로드함.
+//            _triggervc = (RulesTriggerOptionViewController *)[CommonUtil instantiateViewControllerWithIdentifier:@"RulesTriggerOptionViewController" storyboardName:@"Rules"];
+//            _triggervc.tmpItem = _tmpItem;
+//
+//            [self addChildViewController:_triggervc];
+//            [_triggervc didMoveToParentViewController:self];
+//
+//            if ([self isViewLoaded] && tcell.triggerOptionContainer) {
+//                [_triggervc beginAppearanceTransition:YES animated:NO];
+//                [tcell.triggerOptionContainer addSubview:_triggervc.view];
+//                [_triggervc endAppearanceTransition];
+//                [_triggervc.view mas_makeConstraints:^(MASConstraintMaker *make) {
+//                    make.size.mas_equalTo(tcell.triggerOptionContainer);
+//                    make.center.equalTo(tcell.triggerOptionContainer);
+//                }];
+//            }
+//        }
+//
+//        cell = tcell;
     }
 
     cell.selectionStyle = UITableViewCellSelectionStyleNone;
@@ -289,8 +288,8 @@
         RulesDeviceTableViewCell *tcell = (RulesDeviceTableViewCell *)[self tableView:tableView cellForRowAtIndexPath:indexPath];
         [_rgroup someRadioButtonTouched:tcell.rdoSelect];
     } else if (indexPath.section == 2) {
-        RegisterTriggerActivationTableViewCell *tcell = (RegisterTriggerActivationTableViewCell *)[self tableView:tableView cellForRowAtIndexPath:indexPath];
-        [self btnAddTriggerOptionTouched:tcell.btnTriggerOption];
+//        RegisterTriggerActivationTableViewCell *tcell = (RegisterTriggerActivationTableViewCell *)[self tableView:tableView cellForRowAtIndexPath:indexPath];
+//        [self btnAddTriggerOptionTouched:tcell.btnTriggerOption];
     }
 
     [_tableView reloadRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationNone];

+ 0 - 62
kneet2/Classes/ViewControllers/RuelsScreens/RegisterTimerViewController.h

@@ -1,62 +0,0 @@
-//
-//  RulesRegisterTimerViewController.h
-//  kneet
-//
-//  Created by Jason Lee on 3/24/15.
-//  Copyright (c) 2015 ntels. All rights reserved.
-//
-
-#import "JDViewController.h"
-
-@class CustomLabel;
-@class CustomButton;
-@class ItemModel;
-
-@interface CustomDatePicker : UIDatePicker {
-    BOOL changed;
-}
-
-@end
-
-@interface RegisterTimerViewController : JDViewController
-
-
-#pragma mark - Properties
-@property (weak, nonatomic) ItemModel *tmpItem;
-
-@property (weak, nonatomic) IBOutlet UITableView *tableView;
-
-@property (weak, nonatomic) IBOutlet CustomButton *btnSelect;
-@property (weak, nonatomic) IBOutlet CustomButton *btnCancel;
-
-
-#pragma mark - Instance Methods
-- (IBAction)btnSelectTouched:(id)sender;
-- (IBAction)btnCancelTouched:(id)sender;
-
-@end
-
-@interface RegisterTimerTitleTableViewCell : UITableViewCell
-@property (weak, nonatomic) IBOutlet CustomLabel *lblItemTitle;
-
-@end
-
-@interface RegisterPickerTableViewCell : UITableViewCell
-@property (weak, nonatomic) IBOutlet CustomDatePicker *timePicker;
-@end
-
-@interface RegisterTriggerActivationTableViewCell : UITableViewCell {
-    UIImage *_btnAddTriggerImageNormal, *_btnAddTriggerImageHighlight;
-    UIImage *_btnDeleteTriggerImageNormal, *_btnDeleteTriggerImageHighlight;
-}
-
-@property (weak, nonatomic) IBOutlet CustomLabel *lblDesc;
-@property (weak, nonatomic) IBOutlet CustomButton *btnTriggerOption;
-
-- (void)setTriggerOptionEnable:(BOOL)enable;
-
-@end
-
-@interface RegisterContainerTableViewCell : UITableViewCell
-@property (weak, nonatomic) IBOutlet UIView *triggerOptionContainer;
-@end

+ 0 - 338
kneet2/Classes/ViewControllers/RuelsScreens/RegisterTimerViewController.m

@@ -1,338 +0,0 @@
-//
-//  RulesRegisterTimerViewController.m
-//  kneet
-//
-//  Created by Jason Lee on 3/24/15.
-//  Copyright (c) 2015 ntels. All rights reserved.
-//
-@import QuartzCore;
-
-#import "JDObject.h"
-#import "RuleModel.h"
-#import "ItemModel.h"
-
-#import "CustomLabel.h"
-#import "CustomCheckBox.h"
-#import "CommonUtil.h"
-#import "CustomButton.h"
-
-#import "RulesTriggerOptionViewController.h"
-
-#import "RegisterTimerViewController.h"
-
-@implementation CustomDatePicker
-
-- (void)awakeFromNib {
-    self.layer.backgroundColor = [UIColor clearColor].CGColor;
-}
-- (void)addSubview:(UIView *)view {
-
-    if (!changed) {
-        changed = YES;
-        [self setValue:[UIColor whiteColor] forKey:@"textColor"];
-    }
-    [super addSubview:view];
-}
-
-@end
-
-
-@implementation RegisterTimerTitleTableViewCell
-
-
-@end
-
-@implementation RegisterPickerTableViewCell
-
-
-@end
-
-@interface RegisterTriggerActivationTableViewCell () {
-
-}
-
-@end
-
-@implementation RegisterTriggerActivationTableViewCell
-
-- (void)awakeFromNib {
-    _btnAddTriggerImageNormal = [UIImage imageNamed:@"common_list_btn_s_add"];
-    _btnAddTriggerImageHighlight = [UIImage imageNamed:@"common_list_btn_s_add_press"];
-    _btnDeleteTriggerImageNormal = [UIImage imageNamed:@"common_list_btn_del"];
-    _btnDeleteTriggerImageHighlight = [UIImage imageNamed:@"common_list_btn_del_press"];
-    
-    _lblDesc.text = NSLocalizedString(@"특정 날짜나 요일에만 실행하려면\n추가 조건을 걸어보세요", @"특정 날짜나 요일에만 실행하려면\n추가 조건을 걸어보세요");
-}
-
-- (void)setTriggerOptionEnable:(BOOL)enable {
-    if (!enable) {
-        [self.btnTriggerOption setImage:_btnAddTriggerImageNormal forState:UIControlStateNormal];
-        [self.btnTriggerOption setImage:_btnAddTriggerImageHighlight forState:UIControlStateHighlighted];
-
-    } else {
-        [self.btnTriggerOption setImage:_btnDeleteTriggerImageNormal forState:UIControlStateNormal];
-        [self.btnTriggerOption setImage:_btnDeleteTriggerImageHighlight forState:UIControlStateHighlighted];
-    }
-}
-
-@end
-
-@implementation RegisterContainerTableViewCell
-
-@end
-
-
-@interface RegisterTimerViewController () <UIPickerViewDelegate, UITableViewDataSource, UITableViewDelegate> {
-    NSInteger _sectionCount;
-
-    CustomDatePicker *_timePicker;
-    RulesTriggerOptionViewController *_triggervc;
-
-
-    BOOL _isNotFirstLoading;
-}
-@end
-
-
-#pragma mark - Class Definition
-
-@implementation RegisterTimerViewController
-
-
-- (void)viewDidLoad {
-    [super viewDidLoad];
-    // Do any additional setup after loading the view.
-
-    [self initUI];
-    [self prepareViewDidLoad];
-}
-
-
-- (void)initUI {
-
-    
-    
-
-    self.tableView.delegate = self;
-    self.tableView.dataSource = self;
-
-    self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
-    self.tableView.backgroundColor = [UIColor clearColor];
-
-    self.tableView.tableFooterView = [[UIView alloc] init]; //this call table events;
-    
-    [_timePicker setTimeZone:[NSTimeZone systemTimeZone]];
-    
-    //Localization
-    [_btnSelect setTitle:NSLocalizedString(@"선택완료", @"선택완료") forState:UIControlStateNormal];
-    [_btnCancel setTitle:NSLocalizedString(@"취소", @"취소") forState:UIControlStateNormal];
-}
-
-- (void)prepareViewDidLoad {
-
-    ItemSubModel *subItem = _tmpItem.timers[0];
-
-    _sectionCount = subItem.conditions && subItem.conditions.count ? 4 : 3;
-    if (!_tmpItem.timers || !_tmpItem.timers.count)
-        return;
-}
-
-#pragma mark - Main Logic
-
-#pragma mark - UITableView Delegate
-- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
-    return _sectionCount;
-}
-
-- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
-    return 1;
-}
-
-- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
-
-    CGFloat height = 0.0f;
-
-    if (indexPath.section == 0) {
-        height = 75.0f;
-
-    } else if (indexPath.section == 1) {
-        height = 210.0f;
-
-    } else if (indexPath.section == 2) {//activation cell
-        height = 80.0f;
-
-    } else if (indexPath.section == 3) {//container
-        height = 240;
-    }
-    return height;
-}
-
-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-
-    UITableViewCell *cell = nil;
-
-    if (indexPath.section == 0) {
-
-        RegisterTimerTitleTableViewCell *tcell = [tableView dequeueReusableCellWithIdentifier:@"TitleCellIdentifier" forIndexPath:indexPath];
-        if (!tcell) {
-            tcell = (RegisterTimerTitleTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"TitleCellIdentifier"];
-        }
-        tcell.lblItemTitle.text = _tmpItem.itemName;
-        cell = tcell;
-
-    } else if (indexPath.section == 1) {
-        RegisterPickerTableViewCell *tcell = [tableView dequeueReusableCellWithIdentifier:@"PickerCellIdentifier" forIndexPath:indexPath];
-        if (!tcell) {
-            tcell = (RegisterPickerTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"PickerCellIdentifier"];
-        }
-
-        if (!_isNotFirstLoading) {//처음 로딩 시,
-            _isNotFirstLoading = YES;
-
-            ItemSubModel *subItem = _tmpItem.timers[0];
-            NSDateComponents *ds = [CommonUtil dateComponents:[NSDate date] timezone:[NSTimeZone systemTimeZone]];
-            ds.hour = [subItem.hour integerValue];
-            ds.minute = [subItem.minute integerValue];
-            tcell.timePicker.date = [[NSCalendar currentCalendar] dateFromComponents:ds];
-        }
-
-        _timePicker = tcell.timePicker;
-
-        cell = tcell;
-
-    } else if (indexPath.section == 2) {//activation
-        RegisterTriggerActivationTableViewCell *tcell = [tableView dequeueReusableCellWithIdentifier:@"ActivationCellIdentifier" forIndexPath:indexPath];
-        if (!tcell) {
-            tcell = (RegisterTriggerActivationTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"ActivationCellIdentifier"];
-        }
-
-        if (![tcell.btnTriggerOption actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
-            [tcell.btnTriggerOption addTarget:self action:@selector(btnAddTriggerOptionTouched:) forControlEvents:UIControlEventTouchUpInside];
-        }
-
-        //이미지 전환
-        [tcell setTriggerOptionEnable:_sectionCount == 4];
-        cell = tcell;
-    } else if (indexPath.section == 3) {//container
-        RegisterContainerTableViewCell *tcell = (RegisterContainerTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"ContainerCellIdentifier"];
-
-        if (!_triggervc) {//트리거뷰를 로드함.
-            _triggervc = (RulesTriggerOptionViewController *)[CommonUtil instantiateViewControllerWithIdentifier:@"RulesTriggerOptionViewController" storyboardName:@"Rules"];
-            _triggervc.tmpItem = _tmpItem;
-
-            [self addChildViewController:_triggervc];
-            [_triggervc didMoveToParentViewController:self];
-
-            if ([self isViewLoaded] && tcell.triggerOptionContainer) {
-                [_triggervc beginAppearanceTransition:YES animated:NO];
-                [tcell.triggerOptionContainer addSubview:_triggervc.view];
-                [_triggervc endAppearanceTransition];
-                [_triggervc.view mas_makeConstraints:^(MASConstraintMaker *make) {
-                    make.size.mas_equalTo(tcell.triggerOptionContainer);
-                    make.center.equalTo(tcell.triggerOptionContainer);
-                }];
-            }
-        }
-
-        cell = tcell;
-    }
-
-    cell.selectionStyle = UITableViewCellSelectionStyleNone;
-    return cell;
-}
-
-- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
-    [tableView deselectRowAtIndexPath:indexPath animated:YES];
-
-    if (indexPath.section == 2) {//activationCell
-        RegisterTriggerActivationTableViewCell *tcell = (RegisterTriggerActivationTableViewCell *)[self tableView:tableView cellForRowAtIndexPath:indexPath];
-        [self btnAddTriggerOptionTouched:tcell.btnTriggerOption];
-    }
-}
-
-- (void)tableView:(UITableView *)tableView willDisplayCell:(UITableViewCell *)cell forRowAtIndexPath:(NSIndexPath *)indexPath {
-
-    // Remove seperator inset
-    if ([cell respondsToSelector:@selector(setSeparatorInset:)]) {
-        [cell setSeparatorInset:UIEdgeInsetsZero];
-    }
-
-    // Prevent the cell from inheriting the Table View's margin settings
-    if ([cell respondsToSelector:@selector(setPreservesSuperviewLayoutMargins:)]) {
-        [cell setPreservesSuperviewLayoutMargins:NO];
-    }
-
-    // Explictly set your cell's layout margins
-    if ([cell respondsToSelector:@selector(setLayoutMargins:)]) {
-        [cell setLayoutMargins:UIEdgeInsetsZero];
-    }
-}
-
-
-#pragma mark - UI Events
-- (IBAction)btnAddTriggerOptionTouched:(id)sender {
-
-    _sectionCount = _sectionCount == 3 ? 4 : 3;
-    [self.tableView reloadData];
-
-    if (_sectionCount == 4) {
-        NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:3];
-        [self.tableView scrollToRowAtIndexPath:indexPath atScrollPosition:UITableViewScrollPositionTop animated:YES];
-    }
-}
-
-- (void)btnSelectTouched:(id)sender {
-
-    //컨디션을 설정함 - 이전 선택된 컨디션을 유지하기 위해 먼저 확인 - 테이블 뷰의 특성상.
-    NSMutableArray<ItemModel> *conditions = nil;
-    if (_triggervc && [_triggervc hasCondition]) {//트리거를 선택했을 경우,
-        if (!_triggervc.conditions) {
-            return;
-        }
-
-        conditions = _triggervc.conditions;
-    } else {
-        if (_tmpItem.timers && _tmpItem.timers.count && !_triggervc) {
-            ItemSubModel *tmpSubItem = _tmpItem.timers[0];
-            conditions = tmpSubItem.conditions;
-        }
-    }
-
-    //time
-    NSDateComponents *ds = [CommonUtil dateComponents:_timePicker.date timezone:[NSTimeZone systemTimeZone]];
-
-    ItemSubModel *subItem = [[ItemSubModel alloc] init];
-    subItem.hour = [NSString stringWithFormat:@"%zd", ds.hour];
-    subItem.minute = [NSString stringWithFormat:@"%zd", ds.minute];
-
-
-    if (conditions) {
-        subItem.conditions = conditions;
-    }
-    _tmpItem.timers = (NSMutableArray<ItemSubModel> *)[[NSMutableArray alloc] initWithArray:@[subItem]];
-
-    [self.navigationController popViewControllerAnimated:YES];
-}
-
-
-- (void)btnCancelTouched:(id)sender {
-    [self.navigationController popViewControllerAnimated:YES];
-}
-
-
-- (IBAction)btnHourUpTouched:(id)sender {
-
-//    NSDateComponents *ds = [CommonUtil dateComponents:_timePicker.date];
-//    ds.hour += 1;
-//    _timePicker.date = [[NSCalendar currentCalendar] dateFromComponents:ds];
-}
-
-
-#pragma mark - MemoryWarning
-- (void)didReceiveMemoryWarning
-{
-    [super didReceiveMemoryWarning];
-    // Dispose of any resources that can be recreated.
-}
-
-@end

+ 11 - 0
kneet2/Classes/ViewControllers/RuelsScreens/RulesAddViewController.h

@@ -13,11 +13,16 @@
 @class CustomImageView;
 @class CustomButton;
 @class CustomTextView;
+@class CustomTextField;
+
+@class RuleDetailModel;
 
 @interface RulesAddViewController : JDViewController
 
 
 #pragma mark - Properties
+@property (strong, nonatomic) RuleDetailModel *tmpRuleDetail;
+
 @property (weak, nonatomic) IBOutlet CustomTableView *tableView;
 
 #pragma mark - Instance Methods
@@ -27,6 +32,12 @@
 
 @end
 
+@interface RulesAddTitleTableViewCell : KNTableViewCell
+
+@property (weak, nonatomic) IBOutlet CustomTextField *txtRuleTitle;
+
+@end
+
 @interface RulesAddHeaderTableViewCell : KNTableViewCell
 
 @property (weak, nonatomic) IBOutlet CustomLabel *lblTitle;

+ 306 - 40
kneet2/Classes/ViewControllers/RuelsScreens/RulesAddViewController.m

@@ -24,6 +24,13 @@
 #import "TriggerSelectPopupView.h"
 #import "DeviceModel.h"
 #import "CustomTextView.h"
+#import "ValidateUtil.h"
+#import "CustomTextField.h"
+#import "RuleModel.h"
+
+@implementation RulesAddTitleTableViewCell
+
+@end
 
 @implementation RulesAddHeaderTableViewCell
 
@@ -60,6 +67,7 @@
     BOOL _isNotFirstLoading, _isCustomCreation;
     NSMutableArray *_arrayForHeader, *_arrayForFooter;
     
+    CustomTextField *_txtRuleTitle;
     CustomButton *_btnTriggerAdd, *_btnPushAdd;
     
     CustomCheckBox *_chkConditions;
@@ -117,26 +125,203 @@
     }];
 }
 
+- (void)requestRegisterRule {
+    
+    NSArray *triggers       = [self items:_triggers];
+    NSArray *actions        = [self items:_actions];
+    NSArray *conditions     = [self conditions:_triggers];
+    
+    //validate
+    if (!triggers || !triggers.count) {
+        [[JDFacade facade] alert:NSLocalizedString(@"선택된 트리거가 없습니다", @"선택된 트리거가 없습니다")];
+        return;
+    }
+    
+    if (!actions || !actions.count) {
+        [[JDFacade facade] alert:NSLocalizedString(@"액션이 없습니다", @"액션이 없습니다")];
+        return;
+    }
+    
+    //parameters
+    NSDictionary *parameter = @{@"rule_name" : _txtRuleTitle.text,
+                                @"use_yn" : ksYES,
+                                @"triggers": triggers ? triggers : [NSNull null],
+                                @"actions": actions ? actions : [NSNull null],
+                                @"conditions": conditions ? conditions : [NSNull null]};
+    
+    NSString *path = [NSString stringWithFormat:API_POST_RULE];
+    
+    [[RequestHandler handler] sendAsyncPostRequestAPIPath:path parameters:parameter modelClass:[RuleModel class] completion:^(id responseObject) {
+        if (!responseObject) {//응답결과가 잘못되었거나 없을 경우,
+            return;
+        }
+        
+        RuleModel *result = (RuleModel *) responseObject;
+        
+        if (result) {//API 성공 ,
+            [[JDFacade facade] dismissModalStack:YES completion:^{
+                [[JDFacade facade] toast:NSLocalizedString(@"등록되었습니다", @"등록되었습니다")];
+            }];
+        }
+    } failure:^(id errorObject) {
+        JDErrorModel *error = (JDErrorModel *)errorObject;
+        [[JDFacade facade] alert:error.errorMessage];
+    }];
+}
+
+//아이템 배열을 리턴함.
+- (NSArray *)items:(NSArray<ItemModel> *)items {
+    
+    //triggers, actions, conditions
+    
+    NSMutableArray *rItems = [[NSMutableArray alloc] init];
+    
+    for (ItemModel *item in items) {
+        
+        NSDictionary *dic = nil;
+        NSMutableArray *subItems = [[NSMutableArray alloc] init];
+        
+        NSArray *pdevices   = [self subItemsForType:item.subItems itemSubType:ksItemSubTypeCodeDevice];
+        NSArray *pushes     = [self subItemsForType:item.pushes itemSubType:ksItemSubTypeCodeAppPush];
+        NSArray *timers     = [self subItemsForType:item.timers itemSubType:ksItemSubTypeCodeTimer];
+        NSArray *daylights  = [self subItemsForType:item.timers itemSubType:ksItemSubTypeCodeDaylight];
+        
+        if (pdevices && pdevices.count) {//device
+            [subItems addObjectsFromArray:pdevices];
+        }
+        
+        if (pushes && pushes.count) {//push
+            [subItems addObjectsFromArray:pushes];
+        }
+        
+        if (timers && timers.count) {//timer
+            [subItems addObjectsFromArray:timers];
+        }
+        
+        if (daylights && daylights.count) {//해뜰때/질때
+            [subItems addObject:daylights];
+        }
+        
+        if (subItems.count) {
+            dic = @{@"item_name": item.itemName,
+                    @"item_sub_type_code": item.itemSubTypeCode,
+                    @"item_sub": subItems};
+            [rItems addObject:dic];
+        }
+    }
+    
+    return rItems;
+}
+
+//서브아이템 배열을 리턴함.
+- (NSArray *)subItemsForType:(NSArray *)subItems itemSubType:(NSString *)itemSubTypeCode {
+    
+    NSMutableArray *rSubItems = [[NSMutableArray alloc] init];
+    
+    if ([itemSubTypeCode isEqualToString:ksItemSubTypeCodeDevice]) {//디바이스일 경우,
+        for (ItemSubModel *pdevice in subItems) {
+            NSDictionary *rSubItem = @{@"source_id": pdevice.sourceId,
+                                       @"source_sub_id": pdevice.sourceSubId,
+                                       @"cmdcls_value": pdevice.cmdclsValue,
+                                       @"data_type_code": pdevice.dataTypeCode,
+                                       };
+            
+            [rSubItems addObject:rSubItem];
+        }
+        
+    } else if ([itemSubTypeCode isEqualToString:ksItemSubTypeCodeAppPush]) {//푸시일 경우,
+        //at once.
+        
+        for (ItemSubModel *subItem in subItems) {
+            NSDictionary *rSubItem = @{@"cmdcls_value": subItem.cmdclsValue};
+            
+            [rSubItems addObject:rSubItem];
+        }
+        
+    } else if ([itemSubTypeCode isEqualToString:ksItemSubTypeCodeTimer]) {//타이머일 경우,
+        for (ItemSubModel *subItem in subItems) {
+            NSDictionary *rSubItem = @{@"hour": subItem.hour,
+                                       @"minute": subItem.minute,
+                                       @"dayofweek": subItem.cmdclsValue,
+                                       @"repeatable": ksYES};
+            
+            [rSubItems addObject:rSubItem];
+        }
+    } else if ([itemSubTypeCode isEqualToString:ksItemSubTypeCodeDaylight]) {//해뜰때/질때 일 경우,
+        for (ItemSubModel *subItem in subItems) {
+            NSDictionary *rSubItem = @{@"sourceId": subItem.sourceId,
+                                       @"sourceSubId": subItem.sourceSubId};
+            
+            [rSubItems addObject:rSubItem];
+        }
+    }
+    
+    return rSubItems;
+}
+
+
+- (NSArray *)conditions:(NSArray<ItemModel> *)items {//trigger만 해당됨.
+    
+    //conditions
+    NSMutableArray *rConditions = [[NSMutableArray alloc] init];
+    
+    for (ItemModel *item in items) {
+        ItemSubModel *subItem = nil;
+        
+        if ([item.itemSubTypeCode isEqualToString:ksItemSubTypeCodeDevice]) {//디바이스일 경우,
+            subItem = item.predDevices && item.predDevices.count ? item.predDevices[0] : nil;
+        } else if ([item.itemSubTypeCode isEqualToString:ksItemSubTypeCodeMode]) {//모드일 경우,
+            subItem = item.modes[0];
+            
+        } else if ([item.itemSubTypeCode isEqualToString:ksItemSubTypeCodeTimer]) {//타이머일 경우,
+            subItem = item.timers[0];
+        } else if ([item.itemSubTypeCode isEqualToString:ksItemSubTypeCodeGeoFencing]) {//지오펜싱일 경우,
+            subItem = item.mobileDevices && item.mobileDevices.count ? item.mobileDevices[0] : nil;
+        }
+        
+        for (ItemModel *condition in subItem.conditions) {//컨디션 여부
+            ItemModel *copyCondition = [condition copy];
+            
+            
+            for (ItemSubModel *subCondition in copyCondition.subItems) {
+                subCondition.cmdclsValueMsg = nil;
+                subCondition.dueDate = nil;
+                subCondition.daysOfWeek = nil;
+                subCondition.dueTime = nil;
+                subCondition.homeModes = nil;
+                subCondition.externHeat = nil;
+            }
+            
+            [rConditions addObject:[copyCondition toDictionary]];
+        }
+    }
+    
+    return rConditions;
+}
+
 #pragma mark - UITableView DataSource & Delegate
 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
-    return 4;
+    return 5;
 }
 
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
     
     NSInteger count = 0;
-    if (section == 0) {//triggers
+    if  (section == 0) {//title
+        count = 1;
+        
+    } else if (section == 1) {//triggers
         count = _triggers && _triggers.count ? _triggers.count : 0;
         
-    } else if (section == 1) {//actions
+    } else if (section == 2) {//actions
         
         NSArray *matchedSubItems = [_actions matchedArrayInSubArrays:@"subItems" objectName:ksCustomRadioButtonStatus condition:YES];
         count = matchedSubItems && matchedSubItems.count ? matchedSubItems.count : 0;
         
-    } else if (section == 2) {//push-message
+    } else if (section == 3) {//push-message
         count = _pushes && _pushes.count ? _pushes.count : 0;
         
-    } else if (section == 3) {//conditions
+    } else if (section == 4) {//conditions
         count = _chkConditions.checked ? 1 : 0;
     }
     
@@ -146,7 +331,7 @@
 - (NSString *)headerTitleForSection:(NSInteger)section {
     NSString *title = nil;
     
-    if (section == 0) {//trigger
+    if (section == 1) {//trigger
         title = @"이 때가 되면";
         if (_triggers && _triggers.count) {
             ItemModel *item = _triggers[0];
@@ -157,15 +342,15 @@
                 title = @"이 시간마다";
             } else if ([item.itemSubTypeCode isEqualToString:ksItemSubTypeCodeHeat]) {
                 title = @"더울때 / 추울때";
-            } else if ([item.itemSubTypeCode isEqualToString:ksItemSubTypeCodeSun]) {
+            } else if ([item.itemSubTypeCode isEqualToString:ksItemSubTypeCodeDaylight]) {
                 title = @"해뜰때 / 질때";
             }
         }
         
-    } else if (section == 1) {//action
+    } else if (section == 2) {//action
         title = @"이 장치를 실행";
 //        title = _actions && _actions.count ? @"선택됨" : title;
-    } else if (section == 2) {//pushes
+    } else if (section == 3) {//pushes
         title = @"알림 메시지";
 //        title = _pushes && _pushes.count ? @"선택됨" : title;
     }
@@ -178,14 +363,14 @@
 }
 
 - (void)addTargetToHeaderAddButton:(CustomButton *)btnAdd section:(NSInteger)section {
-    if (section == 0) {
+    if (section == 1) {
         _btnTriggerAdd = btnAdd;
         [btnAdd addTarget:self action:@selector(btnAddTriggerTouched:) forControlEvents:UIControlEventTouchUpInside];
         
-    } else if (section == 1) {
+    } else if (section == 2) {
         [btnAdd addTarget:self action:@selector(btnAddActionTouched:) forControlEvents:UIControlEventTouchUpInside];
         
-    } else if (section == 2) {
+    } else if (section == 3) {
         _btnPushAdd = btnAdd;
         [btnAdd addTarget:self action:@selector(btnAddPushMessageTouched:) forControlEvents:UIControlEventTouchUpInside];
     }
@@ -195,8 +380,9 @@
     
     UIView *view = _arrayForHeader.count > section ? _arrayForHeader[section] : nil;
     if (!view) {
-        
-        if (section == 0 || section == 1 || section == 2) {//TODO : hide add button or not;
+        if (section == 0) {
+            view = [[UIView alloc] init];
+        } else if (section == 1 || section == 2 || section == 3) {//TODO : hide add button or not;
 
             RulesAddHeaderTableViewCell *hcell = (RulesAddHeaderTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"HeaderCellIdentifier"];
             view = [[UIView alloc] initWithFrame:hcell.contentView.frame];
@@ -208,7 +394,7 @@
                 [self addTargetToHeaderAddButton:hcell.btnAdd section:section];
             }
             
-        } else if (section == 3) {
+        } else if (section == 4) {
             RulesAddConditionHeaderTableViewCell *hcell = (RulesAddConditionHeaderTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"ConditionHeaderCellIdentifier"];
             
             view = [[UIView alloc] initWithFrame:hcell.contentView.frame];
@@ -220,11 +406,11 @@
         }
     } else {
         
-         if (section == 0 || section == 1 || section == 2) {
+         if (section == 1 || section == 2 || section == 3) {
              RulesAddHeaderTableViewCell *hcell = (RulesAddHeaderTableViewCell *)view.subviews[0];
              hcell.lblTitle.text = hcell.lblTitle.text = [self headerTitleForSection:section];
              
-         } else if (section == 3) {
+         } else if (section == 4) {
              RulesAddConditionHeaderTableViewCell *hcell = (RulesAddConditionHeaderTableViewCell *)view.subviews[0];
          }
     }
@@ -234,6 +420,9 @@
 
 
 - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section {
+    if (section == 0) {
+        return 0.01f;
+    }
     return 90.0f;
 }
 
@@ -256,6 +445,9 @@
 }
 
 - (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section {
+    if (section == 0) {
+        return 0.01f;
+    }
     return 15.0f;
 }
 
@@ -263,52 +455,110 @@
     CGFloat height = 0.0f;
     NSInteger section = indexPath.section;
     
-    if (section == 0) {//triggers
+    if (section == 0) {//title
+        height = 50;
+        
+    } else if (section == 1) {//triggers
         height = 95;
         
-    } else if (section == 1) {//actions
+    } else if (section == 2) {//actions
         height = 95;
         
-    } else if (section == 2) {//push-message
+    } else if (section == 3) {//push-message
         height = 115;
         
-    } else if (section == 3) {//conditions
+    } else if (section == 4) {//conditions
         height = 255;
     }
     
     return height;
 }
 
-- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
-    
-    NSInteger section = indexPath.section;
+- (void)configureTriggerCell:(RulesAddTableViewCell *)cell item:(ItemModel *)item {
     
-    UITableViewCell *cell = nil;
-    
-    if (section == 0) {//triggers
-        ItemModel *item = _triggers[indexPath.row];
-        ItemSubModel *subItem = [item.subItems matchedObjectName:ksCustomRadioButtonStatus condition:YES];
+    ItemSubModel *subItem = nil;
+    if ([item.itemSubTypeCode isEqualToString:ksItemSubTypeCodeDevice]) {
+         subItem = [item.subItems matchedObjectName:ksCustomRadioButtonStatus condition:YES];
         
-        RulesAddTableViewCell *tcell = (RulesAddTableViewCell *)[_tableView dequeueReusableCellWithIdentifier:@"RulesCellIdentifier"];
-        tcell.lblItem.text = item.sourceName;
-        tcell.lblSubItem.text = subItem.sourceSubName;
+        cell.lblItem.text = item.sourceName;
+        cell.lblSubItem.text = subItem.sourceSubName;
         
         //노드의 액션 값을 세팅함.
         if (subItem.cmdclsValueList && subItem.cmdclsValueList.count) {//커맨드클래스 밸루 리스트가 있을 경우,
             CmdClsValueModel *cmdclsValue = [subItem.cmdclsValueList matchedObjectName:ksCustomRadioButtonStatus condition:YES];
-            tcell.lblCondition.text = [DeviceModel contentValueMsgByCmdClsCode:subItem.cmdclsCode cmdclsTypeId:(NSString *)subItem.cmdclsTypeId contentValue:cmdclsValue.cmdclsValue];
+            cell.lblCondition.text = [DeviceModel contentValueMsgByCmdClsCode:subItem.cmdclsCode cmdclsTypeId:(NSString *)subItem.cmdclsTypeId contentValue:cmdclsValue.cmdclsValue];
         } else {
-            tcell.lblCondition.text = subItem.cmdclsValueMsg;
+            cell.lblCondition.text = subItem.cmdclsValueMsg;
         }
+        cell.lblCondition.hidden = NO;
         
-        [tcell.imgvIcon sd_setImageWithURL:[NSURL URLWithString:subItem.imageFileName] placeholderImage:nil options:SDWebImageRefreshCached];
+    } else if ([item.itemSubTypeCode isEqualToString:ksItemSubTypeCodeTimer]) {
         
+        subItem = item.timers && item.timers.count ? item.timers[0] : nil;
+        if (subItem) {
+            NSInteger phour = [subItem.hour integerValue];
+            NSString *period = phour < 12 ? @"AM" : @"PM";//NSLocalizedString(@"오전", @"오전") : NSLocalizedString(@"오후", @"오후");
+            
+            if ([period isEqualToString:NSLocalizedString(@"오후", @"오후")]) {
+                if (phour > 12) {
+                    phour -= 12;
+                }
+            }
+            
+            NSString *title = [NSString stringWithFormat:@"%@ %zd:%@", period, phour, subItem.minute];
+            
+//            NSDictionary *titleColor = @{NSForegroundColorAttributeName : kUITextColor02};
+            cell.lblItem.text = title;
+            cell.lblSubItem.text = subItem.daysOfWeek;
+            
+            cell.lblCondition.hidden = YES;
+        }
+    } else if ([item.itemSubTypeCode isEqualToString:ksItemSubTypeCodeDaylight]) {
+        
+        subItem = item.daylights && item.daylights.count ? item.daylights[0] : nil;
+        if (subItem) {
+            NSString *title = [subItem.sourceId isEqualToString:@"sunriseUtcTime"] ? @"해뜰때" : @"해질때";
+
+            cell.lblItem.text = title;
+            cell.lblSubItem.text = [NSString stringWithFormat:@"%@ / %@", subItem.sourceName, subItem.daysOfWeek];
+            
+            cell.lblCondition.hidden = YES;
+        }
+    }
+    
+    
+    [cell.imgvIcon sd_setImageWithURL:[NSURL URLWithString:subItem.imageFileName] placeholderImage:nil options:SDWebImageRefreshCached];
+}
+
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
+    
+    NSInteger section = indexPath.section;
+    
+    UITableViewCell *cell = nil;
+    
+    if (section == 0) {//title
+        RulesAddTitleTableViewCell *tcell = (RulesAddTitleTableViewCell *)[_tableView dequeueReusableCellWithIdentifier:@"TitleCellIdentifier"];
+        
+        if (!_txtRuleTitle) {
+            _txtRuleTitle = tcell.txtRuleTitle;
+        }
+        
+        cell = tcell;
+        
+    } else if (section == 1) {//triggers
+        ItemModel *item = _triggers[indexPath.row];
+        
+        RulesAddTableViewCell *tcell = (RulesAddTableViewCell *)[_tableView dequeueReusableCellWithIdentifier:@"RulesCellIdentifier"];
+       
+        [self configureTriggerCell:tcell item:item];
+        
+        tcell.btnDelete.value = item;
         if (![tcell.btnDelete actionsForTarget:self forControlEvent:UIControlEventTouchUpInside]) {
             [tcell.btnDelete addTarget:self action:@selector(btnDeleteTriggerTouched:) forControlEvents:UIControlEventTouchUpInside];
         }
         
         cell = tcell;
-    } else if (section == 1) {//actions
+    } else if (section == 2) {//actions
         
         ItemModel *item = _actions[indexPath.row];
 
@@ -345,13 +595,13 @@
         
         cell = tcell;
         
-    } else if (section == 2) {//push-message
+    } else if (section == 3) {//push-message
         RulesAddPushTableViewCell *tcell = (RulesAddPushTableViewCell *)[_tableView dequeueReusableCellWithIdentifier:@"PushCellIdentifier"];
         tcell.txvMessage.delegate = self;
         
         cell = tcell;
 
-    } else if (section == 3) {//conditions
+    } else if (section == 4) {//conditions
         RulesAddTableViewCell *tcell = (RulesAddTableViewCell *)[_tableView dequeueReusableCellWithIdentifier:@"ConditionCellIdentifier"];
         
         cell = tcell;
@@ -400,6 +650,9 @@
                         _actions = (NSMutableArray<ItemModel> *)[[NSMutableArray alloc] init];
                     }
                     
+                    npopup.refDevice.itemName = npopup.refDevice.sourceName;
+                    npopup.refDevice.itemSubTypeCode = ksItemSubTypeCodeDevice;
+                    
                     [_actions addObject:npopup.refDevice];
                     [_tableView reloadData];
                 }
@@ -470,8 +723,21 @@
 
 
 - (IBAction)btnConfirmTouched:(id)sender {
-    //validate
-
+    [self.view endEditing:YES];
+    
+    //1.Validate Title
+    RulesAddTitleTableViewCell *tcell = (RulesAddTitleTableViewCell *)[_tableView cellForRowAtIndexPath:[NSIndexPath indexPathForRow:0 inSection:0]]; //첫번째 섹션
+    
+    if (tcell && ![ValidateUtil validateTextfiled:tcell.txtRuleTitle type:ValidateTypeNull title:NSLocalizedString(@"규칙 이름", @"규칙 이름")]) {
+        return;
+    }
+    
+    if (!_tmpRuleDetail) {//생성
+        [self requestRegisterRule];
+        
+    } else {//수정
+//        [self requestModifyRule];
+    }
 }
 
 - (IBAction)btnCancelTouched:(id)sender {

+ 6 - 7
kneet2/Classes/ViewControllers/RuelsScreens/RulesRegisterViewController.m

@@ -25,7 +25,6 @@
 
 #import "PredefinedDeviceViewController.h"
 #import "RegisterModeViewController.h"
-#import "RegisterTimerViewController.h"
 
 #import "RulesRegisterViewController.h"
 #import "ActionPopTableView.h"
@@ -1313,12 +1312,12 @@
 
         vc = tvc;
     } else if ([item.itemSubTypeCode isEqualToString:ksItemSubTypeCodeTimer]) {//타이머일 경우,
-        RegisterTimerViewController *tvc = (RegisterTimerViewController *)[CommonUtil instantiateViewControllerWithIdentifier:@"RegisterTimerViewController" storyboardName:@"Rules"];
-
-        tvc.title = [self titleForSectionHeader:indexPath.section];
-        tvc.tmpItem = item;
-
-        vc = tvc;
+//        RegisterTimerViewController *tvc = (RegisterTimerViewController *)[CommonUtil instantiateViewControllerWithIdentifier:@"RegisterTimerViewController" storyboardName:@"Rules"];
+//
+//        tvc.title = [self titleForSectionHeader:indexPath.section];
+//        tvc.tmpItem = item;
+//
+//        vc = tvc;
     }
 
     [self.navigationController pushViewController:vc animated:YES];

+ 19 - 21
kneet2/Classes/ViewControllers/RuelsScreens/RulesTriggerOptionViewController.m

@@ -15,7 +15,6 @@
 
 #import "DaysPopupView.h"
 #import "ModePopTableView.h"
-#import "ExternHeatPopupView.h"
 
 #import "RulesTriggerOptionViewController.h"
 
@@ -27,7 +26,6 @@
 
     DaysPopupView *_daysPopupView;
     ModePopTableView *_modePopTableView;
-    ExternHeatPopupView *_externHeatPopView;
 }
 @end
 
@@ -377,13 +375,13 @@
 
 - (ItemModel *)exterHeatCondition {
 
-    if (_chkExternHeat.checked && _externHeatPopView) {
-        _exterHeatCondition = _externHeatPopView.condition;
-    }
-
-    if (!_exterHeatCondition && _chkExternHeat.checked) {
-        [[JDFacade facade] alert:NSLocalizedString(@"지역온도를 선택해주세요", @"지역온도를 선택해주세요")];
-    }
+//    if (_chkExternHeat.checked && _externHeatPopView) {
+//        _exterHeatCondition = _externHeatPopView.condition;
+//    }
+//
+//    if (!_exterHeatCondition && _chkExternHeat.checked) {
+//        [[JDFacade facade] alert:NSLocalizedString(@"지역온도를 선택해주세요", @"지역온도를 선택해주세요")];
+//    }
 
     return _exterHeatCondition;
 }
@@ -587,18 +585,18 @@
 
     _chkExternHeat.checked = YES;
 
-    if (!_externHeatPopView) {
-        _externHeatPopView = [[ExternHeatPopupView alloc] initFromNib];
-    }
-
-    _externHeatPopView.condition = _exterHeatCondition;
-    [_externHeatPopView showWithCompletion:^(CustomAlertView *alertView, NSInteger buttonIndex) {
-        if (buttonIndex == 0) {//선택
-
-            _exterHeatCondition = _externHeatPopView.condition;
-            [_btnExternHeat setTitle:_externHeatPopView.externHeat forState:UIControlStateNormal];
-        }
-    }];
+//    if (!_externHeatPopView) {
+//        _externHeatPopView = [[ExternHeatPopupView alloc] initFromNib];
+//    }
+//
+//    _externHeatPopView.condition = _exterHeatCondition;
+//    [_externHeatPopView showWithCompletion:^(CustomAlertView *alertView, NSInteger buttonIndex) {
+//        if (buttonIndex == 0) {//선택
+//
+//            _exterHeatCondition = _externHeatPopView.condition;
+//            [_btnExternHeat setTitle:_externHeatPopView.externHeat forState:UIControlStateNormal];
+//        }
+//    }];
 }
 
 

+ 0 - 1
kneet2/Classes/ViewControllers/ScenesScreens/ScenesRegisterViewController.m

@@ -24,7 +24,6 @@
 
 #import "PredefinedDeviceViewController.h"
 #import "RegisterModeViewController.h"
-#import "RegisterTimerViewController.h"
 
 #import "RulesRegisterViewController.h"
 

+ 32 - 0
kneet2/Classes/ViewControllers/ThingsScreens/DaylightPopupView.h

@@ -0,0 +1,32 @@
+//
+//  DaylightPopupView.h
+//  kneet2
+//
+//  Created by Jason Lee on 11/24/15.
+//  Copyright (c) 2015 ntels. All rights reserved.
+//
+
+@import UIKit;
+#import "CustomAlertView.h"
+#import "JDViewController.h"
+
+@class CustomCheckBox;
+
+@interface DaylightPopupView : CustomAlertView
+
+@property (weak, nonatomic) ItemModel *daylightTrigger;
+
+//properties
+
+@property (strong, nonatomic) IBOutletCollection(CustomCheckBox) NSArray *chkDays;
+@property (weak, nonatomic) IBOutlet CustomButton *btnSunRise;
+@property (weak, nonatomic) IBOutlet CustomButton *btnSunSet;
+@property (weak, nonatomic) IBOutlet CustomLabel *lblCity;
+
+//methods
+- (id)initFromNib;
+
+- (IBAction)btnSunRiseTouched:(id)sender;
+- (IBAction)btnSunSetTouched:(id)sender;
+
+@end

+ 282 - 0
kneet2/Classes/ViewControllers/ThingsScreens/DaylightPopupView.m

@@ -0,0 +1,282 @@
+//
+//  DaylightPopupView.m
+//  kneet2
+//
+//  Created by Jason Lee on 11/24/15.
+//  Copyright (c) 2015 ntels. All rights reserved.
+//
+#import "JDObject.h"
+
+#import "ItemModel.h"
+#import "JDJSONModel.h"
+
+#import "CustomLabel.h"
+#import "CustomButton.h"
+#import "CustomCheckBox.h"
+#import "CommonUtil.h"
+
+#import "WeatherLocationPopupView.h"
+
+#import "DaylightPopupView.h"
+#import "RequestHandler.h"
+
+@interface DaylightPopupView () {
+    CommonCode *_weatherLocation;
+    NSArray<CommonCode> *_locations;
+    
+    WeatherLocationPopupView *_cpopup;
+}
+
+@end
+
+@implementation DaylightPopupView
+
+- (id)initFromNib {
+
+    for (UIView *view in [CommonUtil nibViews:@"DaylightPopupView"]) {
+        if ([view isKindOfClass:[DaylightPopupView class]]) {
+            self = (DaylightPopupView *)view;
+
+            ((CustomCheckBox *)_chkDays[0]).value = ksDayOfWeekMON;
+            ((CustomCheckBox *)_chkDays[1]).value = ksDayOfWeekTUE;
+            ((CustomCheckBox *)_chkDays[2]).value = ksDayOfWeekWED;
+            ((CustomCheckBox *)_chkDays[3]).value = ksDayOfWeekTHU;
+            ((CustomCheckBox *)_chkDays[4]).value = ksDayOfWeekFRI;
+            ((CustomCheckBox *)_chkDays[5]).value = ksDayOfWeekSAT;
+            ((CustomCheckBox *)_chkDays[6]).value = ksDayOfWeekSUN;
+            
+            
+            for (CustomCheckBox *chk in _chkDays) {
+                [self alignTextAndImageOfButton:chk];
+            }
+            
+            if (!_lblCity.touchHandler) {
+                [_lblCity addTouchEventHandler:^(id label) {
+                    [self lblCityTouched:label];
+                }];
+            }
+            
+            //Localization
+            [self.btnConfirm setTitle:NSLocalizedString(@"확인", @"확인") forState:UIControlStateNormal];
+            [self.btnCancel setTitle:NSLocalizedString(@"취소", @"취소") forState:UIControlStateNormal];
+        }
+    }
+
+    return self;
+}
+
+
+- (void)alignTextAndImageOfButton:(UIButton *)button {
+    // the space between the image and text
+    CGFloat spacing = 6.0;
+    float textMargin = 0;
+    
+    // get the size of the elements here for readability
+    CGSize  imageSize   = button.imageView.image.size;
+    CGSize  titleSize   = button.titleLabel.frame.size;
+    CGFloat totalHeight = (imageSize.height + titleSize.height + spacing);      // get the height they will take up as a unit
+    
+    // lower the text and push it left to center it
+    button.titleEdgeInsets = UIEdgeInsetsMake( 0.0, -imageSize.width +textMargin, - (totalHeight - titleSize.height), +textMargin );   // top, left, bottom, right
+    
+    // the text width might have changed (in case it was shortened before due to
+    // lack of space and isn't anymore now), so we get the frame size again
+    titleSize = button.titleLabel.bounds.size;
+    
+    button.imageEdgeInsets = UIEdgeInsetsMake(25, 0.0, 0.0, -titleSize.width );     // top, left, bottom, right
+}
+
+
+- (void)setDaylightTrigger:(ItemModel *)daylightTrigger {
+    _daylightTrigger = daylightTrigger;
+    
+    if (_daylightTrigger.itemSubTypeCode && [_daylightTrigger.itemSubTypeCode isEqualToString:ksItemSubTypeCodeDaylight]) {//기존 데이터가 있을 경우,
+        ItemSubModel *subItem = _daylightTrigger.daylights[0];
+        
+        _btnSunRise.selected = [subItem.sourceSubId isEqualToString:@"sunriseUtcTime"];
+        _btnSunSet.selected = !_btnSunRise.selected;
+        
+    } else {//is new
+        
+        _daylightTrigger.itemName = @"해뜰때 / 질때";
+        _daylightTrigger.itemSubTypeCode = ksItemSubTypeCodeDaylight;
+        
+        _btnSunRise.selected = YES;
+        
+        for (CustomCheckBox *chk in _chkDays) {
+            chk.checked = YES;
+        }
+    }
+}
+
+
+- (void)didMoveToSuperview {
+    [self requestLocationCode];
+}
+
+#pragma mark - Main Logic
+
+- (void)requestLocationCode {
+    
+    NSString *path = [NSString stringWithFormat:API_GET_LOCATION_CODES];
+    
+    [[RequestHandler handler] sendAsyncGetRequestAPIPath:path parameters:nil modelClass:[CommonCodeList class] completion:^(id responseObject) {
+        if (!responseObject) {//응답결과가 잘못되었거나 없을 경우,
+            return;
+        }
+        
+        CommonCodeList *result = (CommonCodeList *) responseObject;
+        
+        if (result) {//API 성공 ,
+            _locations = result.list;
+            
+            [self setDefaultLocation];
+        }
+        
+    } failure:^(id errorObject) {
+        JDErrorModel *error = (JDErrorModel *)errorObject;
+        [[JDFacade facade] alert:error.errorMessage];
+    }];
+}
+
+- (void)setDefaultLocation {
+    for (CommonCode *code in _locations) {
+        if ([code.commonCodeName isEqualToString:@"서울"]) {
+            _weatherLocation = code;
+            
+            _lblCity.text = [NSString stringWithFormat:@"%@ 지역에", _weatherLocation.commonCodeName];
+            [_lblCity setUnderLine:_weatherLocation.commonCodeName];
+            break;
+        }
+    }
+}
+
+- (NSString *)stringOfDay:(NSInteger)index {
+    NSString *day = nil;
+    switch (index) {
+        case 0:
+            day = NSLocalizedString(@"월", @"월");
+            break;
+        case 1:
+            day = NSLocalizedString(@"화", @"화");
+            break;
+        case 2:
+            day = NSLocalizedString(@"수", @"수");
+            break;
+        case 3:
+            day = NSLocalizedString(@"목", @"목");
+            break;
+        case 4:
+            day = NSLocalizedString(@"금", @"금");
+            break;
+        case 5:
+            day = NSLocalizedString(@"토", @"토");
+            break;
+        case 6:
+            day = NSLocalizedString(@"일", @"일");
+            break;
+    }
+    return day;
+}
+
+- (NSString *)daysOfWeek {
+    //dayOfWeek
+    NSMutableString *days = [[NSMutableString alloc] init];
+    
+    NSInteger i = 0;
+    for (CustomCheckBox *chk in _chkDays) {
+        if (chk.checked) {
+            NSString *prefix = [days isEmptyString] ? ksEmptyString : @", ";
+            [days appendFormat:@"%@%@", prefix, [self stringOfDay:i]];
+        }
+        i++;
+    }
+    return days;
+}
+
+- (NSString *)cmdClsValue {
+    NSMutableString *days = [[NSMutableString alloc] init];
+    
+    for (CustomCheckBox *chk in _chkDays) {
+        if (chk.checked) {
+            NSString *prefix = [days isEmptyString] ? ksEmptyString : @",";
+            [days appendFormat:@"%@%@", prefix, chk.value];
+        }
+    }
+    return days;
+}
+
+#pragma mark - UI Events
+
+- (IBAction)btnSunRiseTouched:(id)sender {
+    _btnSunRise.selected = YES;
+    _btnSunSet.selected = NO;
+}
+
+- (IBAction)btnSunSetTouched:(id)sender {
+    _btnSunRise.selected = NO;
+    _btnSunSet.selected = YES;
+}
+
+- (void)lblCityTouched:(id)sender {
+    
+    if (!_cpopup) {
+        _cpopup = [[WeatherLocationPopupView alloc] initFromNib];
+        _cpopup.locations = _locations;
+    }
+    
+    [_cpopup showWithCompletion:^(CustomAlertView *alertView, NSInteger buttonIndex) {
+        if (buttonIndex == 0) {
+            _weatherLocation = _cpopup.weatherLocation;
+            
+            _lblCity.text = [NSString stringWithFormat:@"%@ 지역에", _weatherLocation.commonCodeName];
+            [_lblCity setUnderLine:_weatherLocation.commonCodeName];
+        }
+    }];
+}
+
+- (BOOL)validateCondition {
+    
+    //1.validate
+    NSInteger count = 0;
+    for (CustomCheckBox *chk in _chkDays) {
+        if (chk.checked) {
+            count++;
+        }
+    }
+    
+    //1. validate
+    if (count == 0) {
+        [[JDFacade facade] alert:NSLocalizedString(@"요일을 선택해주세요", @"요일을 선택해주세요")];
+    }
+    return count;
+}
+
+- (IBAction)btnConfirmTouched:(id)sender {
+    //validate
+    if (![self validateCondition]) {
+        return;
+    }
+
+    ItemSubModel *subItem = nil;
+    if (_daylightTrigger.subItems && _daylightTrigger.subItems.count) {
+        subItem = _daylightTrigger.subItems[0];
+    } else {
+        subItem = [[ItemSubModel alloc] init];
+        
+        _daylightTrigger.daylights = (NSMutableArray<ItemSubModel> *)[[NSMutableArray alloc] init];
+        [_daylightTrigger.daylights addObject:subItem];
+    }
+
+
+    //daylights
+    subItem.sourceId = _weatherLocation.commonCode;
+    subItem.sourceName = _weatherLocation.commonCodeName;
+    subItem.sourceSubId = _btnSunRise.selected ? @"sunriseUtcTime" : @"sunsetUtcTime";
+    subItem.cmdclsValue = [self cmdClsValue];
+    subItem.daysOfWeek = [self daysOfWeek];
+    
+    [super btnConfirmTouched:sender];
+}
+
+@end

+ 818 - 0
kneet2/Classes/ViewControllers/ThingsScreens/DaylightPopupView.xib

@@ -0,0 +1,818 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9060" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="qLf-va-EAG" customClass="DaylightPopupView">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <view alpha="0.29999999999999999" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4c3-gb-BwR" userLabel="maskView">
+                    <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                    <animations/>
+                    <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
+                </view>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sqq-aQ-dqD" userLabel="popUpView">
+                    <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                    <subviews>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3Np-sH-ysD" userLabel="ContainerView">
+                            <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                            <subviews>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7nf-Ia-7Kq" userLabel="View - Title">
+                                    <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                                    <subviews>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="해뜰때 / 질때" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IE2-24-gHl" customClass="CustomLabel">
+                                            <rect key="frame" x="0.0" y="-21" width="42" height="21"/>
+                                            <animations/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="64" id="gmY-Rb-Qao"/>
+                                            </constraints>
+                                            <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
+                                            <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                            <nil key="highlightedColor"/>
+                                            <variation key="default">
+                                                <mask key="constraints">
+                                                    <exclude reference="gmY-Rb-Qao"/>
+                                                </mask>
+                                            </variation>
+                                            <variation key="heightClass=regular-widthClass=compact">
+                                                <mask key="constraints">
+                                                    <include reference="gmY-Rb-Qao"/>
+                                                </mask>
+                                            </variation>
+                                        </label>
+                                    </subviews>
+                                    <animations/>
+                                    <color key="backgroundColor" red="0.95686274510000002" green="0.30588235289999999" blue="0.3294117647" alpha="1" colorSpace="calibratedRGB"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="44" id="1fj-XN-uH0">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="64"/>
+                                        </constraint>
+                                        <constraint firstItem="IE2-24-gHl" firstAttribute="leading" secondItem="7nf-Ia-7Kq" secondAttribute="leading" id="98Q-bq-Oq7">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="20"/>
+                                        </constraint>
+                                        <constraint firstItem="IE2-24-gHl" firstAttribute="top" secondItem="7nf-Ia-7Kq" secondAttribute="top" id="Ldj-nV-yrM">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                                        </constraint>
+                                        <constraint firstAttribute="trailing" secondItem="IE2-24-gHl" secondAttribute="trailing" id="mUY-4l-GjT">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="-8"/>
+                                        </constraint>
+                                        <constraint firstAttribute="bottom" secondItem="IE2-24-gHl" secondAttribute="bottom" id="yzV-EQ-HeM">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                                        </constraint>
+                                    </constraints>
+                                    <variation key="default">
+                                        <mask key="subviews">
+                                            <exclude reference="IE2-24-gHl"/>
+                                        </mask>
+                                        <mask key="constraints">
+                                            <exclude reference="1fj-XN-uH0"/>
+                                            <exclude reference="98Q-bq-Oq7"/>
+                                            <exclude reference="Ldj-nV-yrM"/>
+                                            <exclude reference="mUY-4l-GjT"/>
+                                            <exclude reference="yzV-EQ-HeM"/>
+                                        </mask>
+                                    </variation>
+                                    <variation key="heightClass=regular-widthClass=compact">
+                                        <mask key="subviews">
+                                            <include reference="IE2-24-gHl"/>
+                                        </mask>
+                                        <mask key="constraints">
+                                            <exclude reference="1fj-XN-uH0"/>
+                                            <include reference="98Q-bq-Oq7"/>
+                                            <include reference="Ldj-nV-yrM"/>
+                                            <include reference="mUY-4l-GjT"/>
+                                            <include reference="yzV-EQ-HeM"/>
+                                        </mask>
+                                    </variation>
+                                </view>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Mw5-GF-3oQ" userLabel="View - message">
+                                    <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                                    <subviews>
+                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZLi-Se-du7" userLabel="View - days">
+                                            <rect key="frame" x="0.0" y="0.0" width="240" height="128"/>
+                                            <subviews>
+                                                <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="zGy-bM-YLk" customClass="CustomCheckBox">
+                                                    <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                    <animations/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="36" id="BJY-KH-1tY">
+                                                            <variation key="heightClass=regular-widthClass=compact" constant="40"/>
+                                                        </constraint>
+                                                        <constraint firstAttribute="height" constant="50" id="k2r-na-9Bg"/>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
+                                                    <inset key="titleEdgeInsets" minX="-26" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                                    <inset key="imageEdgeInsets" minX="6" minY="25" maxX="0.0" maxY="0.0"/>
+                                                    <state key="normal" title="SUN" image="common_checkbox_default">
+                                                        <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                                    </state>
+                                                    <state key="highlighted">
+                                                        <color key="titleColor" red="0.96470588239999999" green="0.27058823529999998" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
+                                                    </state>
+                                                    <variation key="default">
+                                                        <mask key="constraints">
+                                                            <exclude reference="BJY-KH-1tY"/>
+                                                            <exclude reference="k2r-na-9Bg"/>
+                                                        </mask>
+                                                    </variation>
+                                                    <variation key="heightClass=regular-widthClass=compact">
+                                                        <mask key="constraints">
+                                                            <include reference="BJY-KH-1tY"/>
+                                                            <include reference="k2r-na-9Bg"/>
+                                                        </mask>
+                                                    </variation>
+                                                </button>
+                                                <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1Oy-jS-Ud8" customClass="CustomCheckBox">
+                                                    <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                    <animations/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="50" id="PJV-EI-OpY"/>
+                                                        <constraint firstAttribute="width" constant="36" id="WBc-Ic-YW2">
+                                                            <variation key="heightClass=regular-widthClass=compact" constant="40"/>
+                                                        </constraint>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
+                                                    <inset key="titleEdgeInsets" minX="-26" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                                    <inset key="imageEdgeInsets" minX="8" minY="25" maxX="0.0" maxY="0.0"/>
+                                                    <state key="normal" title="MON" image="common_checkbox_default">
+                                                        <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                                    </state>
+                                                    <state key="highlighted">
+                                                        <color key="titleColor" red="0.96470588239999999" green="0.27058823529999998" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
+                                                    </state>
+                                                    <variation key="default">
+                                                        <mask key="constraints">
+                                                            <exclude reference="PJV-EI-OpY"/>
+                                                            <exclude reference="WBc-Ic-YW2"/>
+                                                        </mask>
+                                                    </variation>
+                                                    <variation key="heightClass=regular-widthClass=compact">
+                                                        <mask key="constraints">
+                                                            <include reference="PJV-EI-OpY"/>
+                                                            <include reference="WBc-Ic-YW2"/>
+                                                        </mask>
+                                                    </variation>
+                                                </button>
+                                                <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tEs-LC-Apx" customClass="CustomCheckBox">
+                                                    <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                    <animations/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="36" id="Org-up-Glu">
+                                                            <variation key="heightClass=regular-widthClass=compact" constant="40"/>
+                                                        </constraint>
+                                                        <constraint firstAttribute="height" constant="50" id="bSk-1m-ZS2"/>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
+                                                    <inset key="titleEdgeInsets" minX="-26" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                                    <inset key="imageEdgeInsets" minX="6" minY="25" maxX="0.0" maxY="0.0"/>
+                                                    <state key="normal" title="TUE" image="common_checkbox_default">
+                                                        <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                                    </state>
+                                                    <state key="highlighted">
+                                                        <color key="titleColor" red="0.96470588239999999" green="0.27058823529999998" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
+                                                    </state>
+                                                    <variation key="default">
+                                                        <mask key="constraints">
+                                                            <exclude reference="Org-up-Glu"/>
+                                                            <exclude reference="bSk-1m-ZS2"/>
+                                                        </mask>
+                                                    </variation>
+                                                    <variation key="heightClass=regular-widthClass=compact">
+                                                        <mask key="constraints">
+                                                            <include reference="Org-up-Glu"/>
+                                                            <include reference="bSk-1m-ZS2"/>
+                                                        </mask>
+                                                    </variation>
+                                                </button>
+                                                <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="q2d-7q-uU8" customClass="CustomCheckBox">
+                                                    <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                    <animations/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="50" id="2ch-WH-dIs"/>
+                                                        <constraint firstAttribute="width" constant="36" id="9Ph-Xu-0TP">
+                                                            <variation key="heightClass=regular-widthClass=compact" constant="40"/>
+                                                        </constraint>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
+                                                    <inset key="titleEdgeInsets" minX="-26" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                                    <inset key="imageEdgeInsets" minX="6" minY="25" maxX="0.0" maxY="0.0"/>
+                                                    <state key="normal" title="WED" image="common_checkbox_default">
+                                                        <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                                    </state>
+                                                    <state key="highlighted">
+                                                        <color key="titleColor" red="0.96470588239999999" green="0.27058823529999998" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
+                                                    </state>
+                                                    <variation key="default">
+                                                        <mask key="constraints">
+                                                            <exclude reference="2ch-WH-dIs"/>
+                                                            <exclude reference="9Ph-Xu-0TP"/>
+                                                        </mask>
+                                                    </variation>
+                                                    <variation key="heightClass=regular-widthClass=compact">
+                                                        <mask key="constraints">
+                                                            <include reference="2ch-WH-dIs"/>
+                                                            <include reference="9Ph-Xu-0TP"/>
+                                                        </mask>
+                                                    </variation>
+                                                </button>
+                                                <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gnm-iP-QY0" customClass="CustomCheckBox">
+                                                    <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                    <animations/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="36" id="Vlv-Ms-WHn">
+                                                            <variation key="heightClass=regular-widthClass=compact" constant="40"/>
+                                                        </constraint>
+                                                        <constraint firstAttribute="height" constant="50" id="tau-FB-ZEc"/>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
+                                                    <inset key="titleEdgeInsets" minX="-26" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                                    <inset key="imageEdgeInsets" minX="6" minY="25" maxX="0.0" maxY="0.0"/>
+                                                    <state key="normal" title="THU" image="common_checkbox_default">
+                                                        <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                                    </state>
+                                                    <state key="highlighted">
+                                                        <color key="titleColor" red="0.96470588239999999" green="0.27058823529999998" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
+                                                    </state>
+                                                    <variation key="default">
+                                                        <mask key="constraints">
+                                                            <exclude reference="Vlv-Ms-WHn"/>
+                                                            <exclude reference="tau-FB-ZEc"/>
+                                                        </mask>
+                                                    </variation>
+                                                    <variation key="heightClass=regular-widthClass=compact">
+                                                        <mask key="constraints">
+                                                            <include reference="Vlv-Ms-WHn"/>
+                                                            <include reference="tau-FB-ZEc"/>
+                                                        </mask>
+                                                    </variation>
+                                                </button>
+                                                <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gEc-zH-hzY" customClass="CustomCheckBox">
+                                                    <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                    <animations/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="50" id="Stm-DZ-sIz"/>
+                                                        <constraint firstAttribute="width" constant="36" id="Zq5-Sg-gCK">
+                                                            <variation key="heightClass=regular-widthClass=compact" constant="40"/>
+                                                        </constraint>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
+                                                    <inset key="titleEdgeInsets" minX="-26" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                                    <inset key="imageEdgeInsets" minX="6" minY="25" maxX="0.0" maxY="0.0"/>
+                                                    <state key="normal" title="FRI" image="common_checkbox_default">
+                                                        <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                                    </state>
+                                                    <state key="highlighted">
+                                                        <color key="titleColor" red="0.96470588239999999" green="0.27058823529999998" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
+                                                    </state>
+                                                    <variation key="default">
+                                                        <mask key="constraints">
+                                                            <exclude reference="Stm-DZ-sIz"/>
+                                                            <exclude reference="Zq5-Sg-gCK"/>
+                                                        </mask>
+                                                    </variation>
+                                                    <variation key="heightClass=regular-widthClass=compact">
+                                                        <mask key="constraints">
+                                                            <include reference="Stm-DZ-sIz"/>
+                                                            <include reference="Zq5-Sg-gCK"/>
+                                                        </mask>
+                                                    </variation>
+                                                </button>
+                                                <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="o4f-q6-59K" customClass="CustomCheckBox">
+                                                    <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                    <animations/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="50" id="XPv-d7-MIX"/>
+                                                        <constraint firstAttribute="width" constant="36" id="nYI-Nu-P6l">
+                                                            <variation key="heightClass=regular-widthClass=compact" constant="40"/>
+                                                        </constraint>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
+                                                    <inset key="titleEdgeInsets" minX="-26" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                                    <inset key="imageEdgeInsets" minX="6" minY="25" maxX="0.0" maxY="0.0"/>
+                                                    <state key="normal" title="SAT" image="common_checkbox_default">
+                                                        <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                                    </state>
+                                                    <state key="highlighted">
+                                                        <color key="titleColor" red="0.96470588239999999" green="0.27058823529999998" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
+                                                    </state>
+                                                    <variation key="default">
+                                                        <mask key="constraints">
+                                                            <exclude reference="XPv-d7-MIX"/>
+                                                            <exclude reference="nYI-Nu-P6l"/>
+                                                        </mask>
+                                                    </variation>
+                                                    <variation key="heightClass=regular-widthClass=compact">
+                                                        <mask key="constraints">
+                                                            <include reference="XPv-d7-MIX"/>
+                                                            <include reference="nYI-Nu-P6l"/>
+                                                        </mask>
+                                                    </variation>
+                                                </button>
+                                            </subviews>
+                                            <animations/>
+                                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                            <constraints>
+                                                <constraint firstItem="tEs-LC-Apx" firstAttribute="leading" secondItem="1Oy-jS-Ud8" secondAttribute="trailing" id="2QB-ji-wZE"/>
+                                                <constraint firstItem="tEs-LC-Apx" firstAttribute="centerY" secondItem="1Oy-jS-Ud8" secondAttribute="centerY" id="Fft-qq-bZn"/>
+                                                <constraint firstAttribute="height" constant="50" id="FtA-7U-SSB"/>
+                                                <constraint firstItem="1Oy-jS-Ud8" firstAttribute="leading" secondItem="ZLi-Se-du7" secondAttribute="leading" constant="5" id="GpP-m8-6VH">
+                                                    <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                                                </constraint>
+                                                <constraint firstItem="tEs-LC-Apx" firstAttribute="centerY" secondItem="q2d-7q-uU8" secondAttribute="centerY" id="NcT-o2-E4s"/>
+                                                <constraint firstItem="zGy-bM-YLk" firstAttribute="leading" secondItem="o4f-q6-59K" secondAttribute="trailing" id="NlM-oU-U4q"/>
+                                                <constraint firstItem="1Oy-jS-Ud8" firstAttribute="top" secondItem="ZLi-Se-du7" secondAttribute="top" id="PUa-PM-zqn"/>
+                                                <constraint firstItem="gEc-zH-hzY" firstAttribute="centerY" secondItem="o4f-q6-59K" secondAttribute="centerY" id="RSf-w4-s9j"/>
+                                                <constraint firstItem="gnm-iP-QY0" firstAttribute="leading" secondItem="q2d-7q-uU8" secondAttribute="trailing" id="SKq-i7-LoV"/>
+                                                <constraint firstItem="q2d-7q-uU8" firstAttribute="centerY" secondItem="gnm-iP-QY0" secondAttribute="centerY" id="aMH-w7-y8I"/>
+                                                <constraint firstItem="zGy-bM-YLk" firstAttribute="centerY" secondItem="o4f-q6-59K" secondAttribute="centerY" id="g06-pK-BuC"/>
+                                                <constraint firstItem="q2d-7q-uU8" firstAttribute="leading" secondItem="tEs-LC-Apx" secondAttribute="trailing" id="grt-Ny-anD"/>
+                                                <constraint firstItem="gEc-zH-hzY" firstAttribute="leading" secondItem="gnm-iP-QY0" secondAttribute="trailing" id="hRL-CP-iPT"/>
+                                                <constraint firstItem="gnm-iP-QY0" firstAttribute="centerY" secondItem="gEc-zH-hzY" secondAttribute="centerY" id="sNq-bS-KDt"/>
+                                                <constraint firstItem="o4f-q6-59K" firstAttribute="leading" secondItem="gEc-zH-hzY" secondAttribute="trailing" id="u62-rv-3Ha"/>
+                                            </constraints>
+                                            <variation key="default">
+                                                <mask key="subviews">
+                                                    <exclude reference="zGy-bM-YLk"/>
+                                                    <exclude reference="1Oy-jS-Ud8"/>
+                                                    <exclude reference="tEs-LC-Apx"/>
+                                                    <exclude reference="q2d-7q-uU8"/>
+                                                    <exclude reference="gnm-iP-QY0"/>
+                                                    <exclude reference="gEc-zH-hzY"/>
+                                                    <exclude reference="o4f-q6-59K"/>
+                                                </mask>
+                                                <mask key="constraints">
+                                                    <exclude reference="FtA-7U-SSB"/>
+                                                    <exclude reference="GpP-m8-6VH"/>
+                                                    <exclude reference="PUa-PM-zqn"/>
+                                                    <exclude reference="RSf-w4-s9j"/>
+                                                    <exclude reference="hRL-CP-iPT"/>
+                                                    <exclude reference="SKq-i7-LoV"/>
+                                                    <exclude reference="sNq-bS-KDt"/>
+                                                    <exclude reference="u62-rv-3Ha"/>
+                                                    <exclude reference="aMH-w7-y8I"/>
+                                                    <exclude reference="grt-Ny-anD"/>
+                                                    <exclude reference="2QB-ji-wZE"/>
+                                                    <exclude reference="Fft-qq-bZn"/>
+                                                    <exclude reference="NcT-o2-E4s"/>
+                                                    <exclude reference="NlM-oU-U4q"/>
+                                                    <exclude reference="g06-pK-BuC"/>
+                                                </mask>
+                                            </variation>
+                                            <variation key="heightClass=regular-widthClass=compact">
+                                                <mask key="subviews">
+                                                    <include reference="zGy-bM-YLk"/>
+                                                    <include reference="1Oy-jS-Ud8"/>
+                                                    <include reference="tEs-LC-Apx"/>
+                                                    <include reference="q2d-7q-uU8"/>
+                                                    <include reference="gnm-iP-QY0"/>
+                                                    <include reference="gEc-zH-hzY"/>
+                                                    <include reference="o4f-q6-59K"/>
+                                                </mask>
+                                                <mask key="constraints">
+                                                    <include reference="FtA-7U-SSB"/>
+                                                    <include reference="GpP-m8-6VH"/>
+                                                    <include reference="PUa-PM-zqn"/>
+                                                    <include reference="RSf-w4-s9j"/>
+                                                    <include reference="hRL-CP-iPT"/>
+                                                    <include reference="SKq-i7-LoV"/>
+                                                    <include reference="sNq-bS-KDt"/>
+                                                    <include reference="u62-rv-3Ha"/>
+                                                    <include reference="aMH-w7-y8I"/>
+                                                    <include reference="grt-Ny-anD"/>
+                                                    <include reference="2QB-ji-wZE"/>
+                                                    <include reference="Fft-qq-bZn"/>
+                                                    <include reference="NcT-o2-E4s"/>
+                                                    <include reference="NlM-oU-U4q"/>
+                                                    <include reference="g06-pK-BuC"/>
+                                                </mask>
+                                            </variation>
+                                        </view>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="야후 웨더 연동" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nWV-Nb-Kmi" customClass="CustomLabel">
+                                            <rect key="frame" x="-42" y="-21" width="42" height="21"/>
+                                            <animations/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="15" id="lRB-LX-fu5"/>
+                                            </constraints>
+                                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                            <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
+                                            <nil key="highlightedColor"/>
+                                            <variation key="default">
+                                                <mask key="constraints">
+                                                    <exclude reference="lRB-LX-fu5"/>
+                                                </mask>
+                                            </variation>
+                                            <variation key="heightClass=regular-widthClass=compact">
+                                                <mask key="constraints">
+                                                    <include reference="lRB-LX-fu5"/>
+                                                </mask>
+                                            </variation>
+                                        </label>
+                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="p2W-SQ-1PI" customClass="CustomButton">
+                                            <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                            <animations/>
+                                            <constraints>
+                                                <constraint firstAttribute="width" constant="110" id="emw-1h-UQK"/>
+                                                <constraint firstAttribute="height" constant="30" id="mNo-pW-Fzr"/>
+                                            </constraints>
+                                            <fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
+                                            <state key="normal" title="해뜰때"/>
+                                            <variation key="default">
+                                                <mask key="constraints">
+                                                    <exclude reference="emw-1h-UQK"/>
+                                                    <exclude reference="mNo-pW-Fzr"/>
+                                                </mask>
+                                            </variation>
+                                            <variation key="heightClass=regular-widthClass=compact">
+                                                <mask key="constraints">
+                                                    <include reference="emw-1h-UQK"/>
+                                                    <include reference="mNo-pW-Fzr"/>
+                                                </mask>
+                                            </variation>
+                                            <connections>
+                                                <action selector="btnSunRiseTouched:" destination="qLf-va-EAG" eventType="touchUpInside" id="Z5g-17-Tj5"/>
+                                            </connections>
+                                        </button>
+                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IuS-hc-CS1" customClass="CustomButton">
+                                            <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                            <animations/>
+                                            <fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
+                                            <state key="normal" title="해질때"/>
+                                            <connections>
+                                                <action selector="btnSunSetTouched:" destination="qLf-va-EAG" eventType="touchUpInside" id="kr4-w0-lPi"/>
+                                            </connections>
+                                        </button>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bQW-Tp-LY8" customClass="CustomLabel">
+                                            <rect key="frame" x="-42" y="-21" width="42" height="21"/>
+                                            <animations/>
+                                            <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                                            <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
+                                            <nil key="highlightedColor"/>
+                                        </label>
+                                    </subviews>
+                                    <animations/>
+                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                    <constraints>
+                                        <constraint firstItem="p2W-SQ-1PI" firstAttribute="leading" secondItem="Mw5-GF-3oQ" secondAttribute="leading" constant="30" id="09I-i0-TVv"/>
+                                        <constraint firstAttribute="trailing" secondItem="nWV-Nb-Kmi" secondAttribute="trailing" constant="15" id="6as-n0-hha"/>
+                                        <constraint firstItem="IuS-hc-CS1" firstAttribute="height" secondItem="p2W-SQ-1PI" secondAttribute="height" id="7Dm-3a-Fd1"/>
+                                        <constraint firstAttribute="bottom" secondItem="ZLi-Se-du7" secondAttribute="bottom" constant="25" id="8Yh-yb-IuI"/>
+                                        <constraint firstItem="IuS-hc-CS1" firstAttribute="width" secondItem="p2W-SQ-1PI" secondAttribute="width" id="B2n-qp-qpP"/>
+                                        <constraint firstItem="p2W-SQ-1PI" firstAttribute="top" secondItem="nWV-Nb-Kmi" secondAttribute="bottom" constant="40" id="F08-wm-xBG"/>
+                                        <constraint firstItem="IuS-hc-CS1" firstAttribute="leading" secondItem="p2W-SQ-1PI" secondAttribute="trailing" constant="10" id="JIn-So-348"/>
+                                        <constraint firstItem="ZLi-Se-du7" firstAttribute="leading" secondItem="Mw5-GF-3oQ" secondAttribute="leading" id="Jeq-dm-hZR">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="10"/>
+                                        </constraint>
+                                        <constraint firstItem="nWV-Nb-Kmi" firstAttribute="top" secondItem="Mw5-GF-3oQ" secondAttribute="top" constant="20" id="N0x-yA-A3e"/>
+                                        <constraint firstAttribute="trailing" secondItem="bQW-Tp-LY8" secondAttribute="trailing" constant="30" id="NiH-1W-TAP"/>
+                                        <constraint firstItem="ZLi-Se-du7" firstAttribute="top" secondItem="bQW-Tp-LY8" secondAttribute="bottom" constant="40" id="Qzr-Ha-iVN"/>
+                                        <constraint firstItem="bQW-Tp-LY8" firstAttribute="leading" secondItem="Mw5-GF-3oQ" secondAttribute="leading" constant="30" id="fmC-wN-uF8"/>
+                                        <constraint firstItem="IuS-hc-CS1" firstAttribute="centerY" secondItem="p2W-SQ-1PI" secondAttribute="centerY" id="hjf-qu-9gQ"/>
+                                        <constraint firstItem="bQW-Tp-LY8" firstAttribute="top" secondItem="p2W-SQ-1PI" secondAttribute="bottom" constant="40" id="idm-Sn-5Xl"/>
+                                        <constraint firstAttribute="trailing" secondItem="IuS-hc-CS1" secondAttribute="trailing" constant="30" id="lZB-Nn-rJi"/>
+                                        <constraint firstItem="nWV-Nb-Kmi" firstAttribute="leading" secondItem="Mw5-GF-3oQ" secondAttribute="leading" constant="15" id="mhc-oe-5Ox"/>
+                                        <constraint firstAttribute="trailing" secondItem="ZLi-Se-du7" secondAttribute="trailing" id="qou-uS-gii">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                                        </constraint>
+                                    </constraints>
+                                    <variation key="default">
+                                        <mask key="subviews">
+                                            <exclude reference="ZLi-Se-du7"/>
+                                            <exclude reference="nWV-Nb-Kmi"/>
+                                            <exclude reference="p2W-SQ-1PI"/>
+                                            <exclude reference="IuS-hc-CS1"/>
+                                            <exclude reference="bQW-Tp-LY8"/>
+                                        </mask>
+                                        <mask key="constraints">
+                                            <exclude reference="6as-n0-hha"/>
+                                            <exclude reference="N0x-yA-A3e"/>
+                                            <exclude reference="mhc-oe-5Ox"/>
+                                            <exclude reference="09I-i0-TVv"/>
+                                            <exclude reference="F08-wm-xBG"/>
+                                            <exclude reference="NiH-1W-TAP"/>
+                                            <exclude reference="fmC-wN-uF8"/>
+                                            <exclude reference="idm-Sn-5Xl"/>
+                                            <exclude reference="7Dm-3a-Fd1"/>
+                                            <exclude reference="B2n-qp-qpP"/>
+                                            <exclude reference="JIn-So-348"/>
+                                            <exclude reference="hjf-qu-9gQ"/>
+                                            <exclude reference="lZB-Nn-rJi"/>
+                                            <exclude reference="8Yh-yb-IuI"/>
+                                            <exclude reference="Jeq-dm-hZR"/>
+                                            <exclude reference="Qzr-Ha-iVN"/>
+                                            <exclude reference="qou-uS-gii"/>
+                                        </mask>
+                                    </variation>
+                                    <variation key="heightClass=regular-widthClass=compact">
+                                        <mask key="subviews">
+                                            <include reference="ZLi-Se-du7"/>
+                                            <include reference="nWV-Nb-Kmi"/>
+                                            <include reference="p2W-SQ-1PI"/>
+                                            <include reference="IuS-hc-CS1"/>
+                                            <include reference="bQW-Tp-LY8"/>
+                                        </mask>
+                                        <mask key="constraints">
+                                            <include reference="6as-n0-hha"/>
+                                            <include reference="N0x-yA-A3e"/>
+                                            <include reference="mhc-oe-5Ox"/>
+                                            <include reference="09I-i0-TVv"/>
+                                            <include reference="F08-wm-xBG"/>
+                                            <include reference="NiH-1W-TAP"/>
+                                            <include reference="fmC-wN-uF8"/>
+                                            <include reference="idm-Sn-5Xl"/>
+                                            <include reference="7Dm-3a-Fd1"/>
+                                            <include reference="B2n-qp-qpP"/>
+                                            <include reference="JIn-So-348"/>
+                                            <include reference="hjf-qu-9gQ"/>
+                                            <include reference="lZB-Nn-rJi"/>
+                                            <include reference="8Yh-yb-IuI"/>
+                                            <include reference="Jeq-dm-hZR"/>
+                                            <include reference="Qzr-Ha-iVN"/>
+                                            <include reference="qou-uS-gii"/>
+                                        </mask>
+                                    </variation>
+                                </view>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bIs-li-8bz" userLabel="View - Buttons">
+                                    <rect key="frame" x="-20" y="156" width="338" height="90"/>
+                                    <subviews>
+                                        <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="145" placeholderIntrinsicHeight="70" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FKG-xS-HlM" customClass="CustomButton">
+                                            <rect key="frame" x="20" y="20" width="149" height="50"/>
+                                            <animations/>
+                                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                            <constraints>
+                                                <constraint firstAttribute="width" relation="greaterThanOrEqual" id="BNE-7a-kbD"/>
+                                            </constraints>
+                                            <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                                            <state key="normal" title="확인">
+                                                <color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
+                                                <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                            </state>
+                                            <state key="highlighted">
+                                                <color key="titleColor" red="0.73601246840000001" green="0.3682315451" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
+                                            </state>
+                                            <variation key="default">
+                                                <mask key="constraints">
+                                                    <exclude reference="BNE-7a-kbD"/>
+                                                </mask>
+                                            </variation>
+                                            <variation key="heightClass=regular-widthClass=compact">
+                                                <mask key="constraints">
+                                                    <include reference="BNE-7a-kbD"/>
+                                                </mask>
+                                            </variation>
+                                            <connections>
+                                                <action selector="btnConfirmTouched:" destination="qLf-va-EAG" eventType="touchUpInside" id="JvU-lL-1vP"/>
+                                            </connections>
+                                        </button>
+                                        <button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="249" horizontalCompressionResistancePriority="749" placeholderIntrinsicWidth="144" placeholderIntrinsicHeight="70" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="EtP-9O-R3A" customClass="CustomButton">
+                                            <rect key="frame" x="170" y="20" width="148" height="50"/>
+                                            <animations/>
+                                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="44" id="L9v-r3-6MJ">
+                                                    <variation key="heightClass=regular-widthClass=compact" constant="50"/>
+                                                </constraint>
+                                            </constraints>
+                                            <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                                            <state key="normal" title="취소">
+                                                <color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
+                                                <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                            </state>
+                                            <variation key="default">
+                                                <mask key="constraints">
+                                                    <exclude reference="L9v-r3-6MJ"/>
+                                                </mask>
+                                            </variation>
+                                            <variation key="heightClass=regular-widthClass=compact">
+                                                <mask key="constraints">
+                                                    <exclude reference="L9v-r3-6MJ"/>
+                                                </mask>
+                                            </variation>
+                                            <connections>
+                                                <action selector="btnCancelTouched:" destination="qLf-va-EAG" eventType="touchUpInside" id="g5k-Tn-E33"/>
+                                            </connections>
+                                        </button>
+                                    </subviews>
+                                    <animations/>
+                                    <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                    <constraints>
+                                        <constraint firstItem="FKG-xS-HlM" firstAttribute="leading" secondItem="bIs-li-8bz" secondAttribute="leading" id="Fkf-og-ytd"/>
+                                        <constraint firstAttribute="trailing" secondItem="EtP-9O-R3A" secondAttribute="trailing" id="PjC-cB-YfR"/>
+                                        <constraint firstItem="FKG-xS-HlM" firstAttribute="top" secondItem="bIs-li-8bz" secondAttribute="top" constant="1" id="hu2-xM-w64"/>
+                                        <constraint firstAttribute="bottom" secondItem="FKG-xS-HlM" secondAttribute="bottom" id="l9l-jK-cst"/>
+                                        <constraint firstItem="EtP-9O-R3A" firstAttribute="width" secondItem="FKG-xS-HlM" secondAttribute="width" id="qJo-Xg-EhL">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="-1"/>
+                                        </constraint>
+                                        <constraint firstItem="EtP-9O-R3A" firstAttribute="leading" secondItem="FKG-xS-HlM" secondAttribute="trailing" constant="1" id="rpW-dL-KWs"/>
+                                        <constraint firstAttribute="bottom" secondItem="EtP-9O-R3A" secondAttribute="bottom" id="sQC-dK-bJs"/>
+                                        <constraint firstItem="EtP-9O-R3A" firstAttribute="top" secondItem="bIs-li-8bz" secondAttribute="top" constant="1" id="xsM-oo-x8a"/>
+                                    </constraints>
+                                    <variation key="default">
+                                        <mask key="constraints">
+                                            <exclude reference="Fkf-og-ytd"/>
+                                            <exclude reference="hu2-xM-w64"/>
+                                            <exclude reference="l9l-jK-cst"/>
+                                            <exclude reference="PjC-cB-YfR"/>
+                                            <exclude reference="qJo-Xg-EhL"/>
+                                            <exclude reference="rpW-dL-KWs"/>
+                                            <exclude reference="sQC-dK-bJs"/>
+                                            <exclude reference="xsM-oo-x8a"/>
+                                        </mask>
+                                    </variation>
+                                    <variation key="heightClass=regular-widthClass=compact">
+                                        <mask key="constraints">
+                                            <include reference="Fkf-og-ytd"/>
+                                            <include reference="hu2-xM-w64"/>
+                                            <include reference="l9l-jK-cst"/>
+                                            <include reference="PjC-cB-YfR"/>
+                                            <include reference="qJo-Xg-EhL"/>
+                                            <include reference="rpW-dL-KWs"/>
+                                            <include reference="sQC-dK-bJs"/>
+                                            <include reference="xsM-oo-x8a"/>
+                                        </mask>
+                                    </variation>
+                                </view>
+                            </subviews>
+                            <animations/>
+                            <constraints>
+                                <constraint firstAttribute="trailing" secondItem="7nf-Ia-7Kq" secondAttribute="trailing" id="QFZ-sI-FTg"/>
+                                <constraint firstItem="Mw5-GF-3oQ" firstAttribute="leading" secondItem="3Np-sH-ysD" secondAttribute="leading" id="RFN-Kf-txX"/>
+                                <constraint firstItem="7nf-Ia-7Kq" firstAttribute="top" secondItem="3Np-sH-ysD" secondAttribute="top" id="SU0-8W-BVB">
+                                    <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                                </constraint>
+                                <constraint firstItem="Mw5-GF-3oQ" firstAttribute="centerY" secondItem="3Np-sH-ysD" secondAttribute="centerY" id="UWf-rC-hV7">
+                                    <variation key="heightClass=regular-widthClass=compact" constant="-3.5"/>
+                                </constraint>
+                                <constraint firstAttribute="trailing" secondItem="bIs-li-8bz" secondAttribute="trailing" id="UaC-ap-Ulp"/>
+                                <constraint firstItem="7nf-Ia-7Kq" firstAttribute="trailing" secondItem="Mw5-GF-3oQ" secondAttribute="trailing" id="fbA-Cy-O1e"/>
+                                <constraint firstItem="Mw5-GF-3oQ" firstAttribute="top" secondItem="7nf-Ia-7Kq" secondAttribute="bottom" constant="1" id="hfD-i1-Fhe">
+                                    <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                                </constraint>
+                                <constraint firstItem="7nf-Ia-7Kq" firstAttribute="leading" secondItem="3Np-sH-ysD" secondAttribute="leading" id="j4G-mB-NeU"/>
+                                <constraint firstAttribute="bottom" secondItem="bIs-li-8bz" secondAttribute="bottom" id="oNC-iJ-Za7"/>
+                                <constraint firstItem="bIs-li-8bz" firstAttribute="leading" secondItem="3Np-sH-ysD" secondAttribute="leading" id="s6c-op-QFh"/>
+                                <constraint firstItem="bIs-li-8bz" firstAttribute="top" secondItem="Mw5-GF-3oQ" secondAttribute="bottom" id="wPf-du-0AV"/>
+                            </constraints>
+                            <variation key="default">
+                                <mask key="subviews">
+                                    <exclude reference="7nf-Ia-7Kq"/>
+                                    <exclude reference="Mw5-GF-3oQ"/>
+                                </mask>
+                                <mask key="constraints">
+                                    <exclude reference="UaC-ap-Ulp"/>
+                                    <exclude reference="oNC-iJ-Za7"/>
+                                    <exclude reference="s6c-op-QFh"/>
+                                    <exclude reference="wPf-du-0AV"/>
+                                    <exclude reference="QFZ-sI-FTg"/>
+                                    <exclude reference="SU0-8W-BVB"/>
+                                    <exclude reference="fbA-Cy-O1e"/>
+                                    <exclude reference="j4G-mB-NeU"/>
+                                    <exclude reference="RFN-Kf-txX"/>
+                                    <exclude reference="UWf-rC-hV7"/>
+                                    <exclude reference="hfD-i1-Fhe"/>
+                                </mask>
+                            </variation>
+                            <variation key="heightClass=regular-widthClass=compact">
+                                <mask key="subviews">
+                                    <include reference="7nf-Ia-7Kq"/>
+                                    <include reference="Mw5-GF-3oQ"/>
+                                </mask>
+                                <mask key="constraints">
+                                    <include reference="UaC-ap-Ulp"/>
+                                    <include reference="oNC-iJ-Za7"/>
+                                    <include reference="s6c-op-QFh"/>
+                                    <include reference="wPf-du-0AV"/>
+                                    <include reference="QFZ-sI-FTg"/>
+                                    <include reference="SU0-8W-BVB"/>
+                                    <include reference="fbA-Cy-O1e"/>
+                                    <include reference="j4G-mB-NeU"/>
+                                    <include reference="RFN-Kf-txX"/>
+                                    <include reference="UWf-rC-hV7"/>
+                                    <include reference="hfD-i1-Fhe"/>
+                                </mask>
+                            </variation>
+                        </view>
+                    </subviews>
+                    <animations/>
+                    <constraints>
+                        <constraint firstAttribute="bottom" secondItem="3Np-sH-ysD" secondAttribute="bottom" constant="1" id="4tu-Yz-TS5">
+                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                        </constraint>
+                        <constraint firstItem="3Np-sH-ysD" firstAttribute="top" secondItem="sqq-aQ-dqD" secondAttribute="top" constant="1" id="CFR-Ui-y7e">
+                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                        </constraint>
+                        <constraint firstAttribute="trailing" secondItem="3Np-sH-ysD" secondAttribute="trailing" constant="66" id="SmO-lm-bHQ">
+                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                        </constraint>
+                        <constraint firstItem="3Np-sH-ysD" firstAttribute="leading" secondItem="sqq-aQ-dqD" secondAttribute="leading" constant="66" id="feN-Ai-BHU">
+                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                        </constraint>
+                    </constraints>
+                    <variation key="default">
+                        <mask key="subviews">
+                            <exclude reference="3Np-sH-ysD"/>
+                        </mask>
+                        <mask key="constraints">
+                            <exclude reference="4tu-Yz-TS5"/>
+                            <exclude reference="CFR-Ui-y7e"/>
+                            <exclude reference="SmO-lm-bHQ"/>
+                            <exclude reference="feN-Ai-BHU"/>
+                        </mask>
+                    </variation>
+                    <variation key="heightClass=regular-widthClass=compact">
+                        <mask key="subviews">
+                            <include reference="3Np-sH-ysD"/>
+                        </mask>
+                        <mask key="constraints">
+                            <include reference="4tu-Yz-TS5"/>
+                            <include reference="CFR-Ui-y7e"/>
+                            <include reference="SmO-lm-bHQ"/>
+                            <include reference="feN-Ai-BHU"/>
+                        </mask>
+                    </variation>
+                </view>
+            </subviews>
+            <animations/>
+            <constraints>
+                <constraint firstAttribute="centerX" secondItem="4c3-gb-BwR" secondAttribute="centerX" id="0tG-Bd-2ic"/>
+                <constraint firstAttribute="trailing" secondItem="4c3-gb-BwR" secondAttribute="trailing" id="F9j-6m-8Sq"/>
+                <constraint firstAttribute="trailing" secondItem="sqq-aQ-dqD" secondAttribute="trailing" constant="15" id="J8W-3c-fXE"/>
+                <constraint firstAttribute="centerY" secondItem="4c3-gb-BwR" secondAttribute="centerY" id="JX5-Sx-hSJ"/>
+                <constraint firstItem="sqq-aQ-dqD" firstAttribute="centerY" secondItem="qLf-va-EAG" secondAttribute="centerY" id="Pfa-lH-sS7"/>
+                <constraint firstItem="4c3-gb-BwR" firstAttribute="top" secondItem="qLf-va-EAG" secondAttribute="top" id="TOG-yL-xSq"/>
+                <constraint firstAttribute="bottom" secondItem="4c3-gb-BwR" secondAttribute="bottom" id="uc7-M6-ZYJ"/>
+                <constraint firstItem="4c3-gb-BwR" firstAttribute="leading" secondItem="qLf-va-EAG" secondAttribute="leading" id="wPB-Gl-TgQ"/>
+                <constraint firstItem="sqq-aQ-dqD" firstAttribute="leading" secondItem="qLf-va-EAG" secondAttribute="leading" constant="15" id="whE-VD-v7i"/>
+            </constraints>
+            <simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
+            <variation key="default">
+                <mask key="subviews">
+                    <exclude reference="4c3-gb-BwR"/>
+                    <exclude reference="sqq-aQ-dqD"/>
+                </mask>
+                <mask key="constraints">
+                    <exclude reference="0tG-Bd-2ic"/>
+                    <exclude reference="F9j-6m-8Sq"/>
+                    <exclude reference="JX5-Sx-hSJ"/>
+                    <exclude reference="TOG-yL-xSq"/>
+                    <exclude reference="uc7-M6-ZYJ"/>
+                    <exclude reference="wPB-Gl-TgQ"/>
+                    <exclude reference="J8W-3c-fXE"/>
+                    <exclude reference="Pfa-lH-sS7"/>
+                    <exclude reference="whE-VD-v7i"/>
+                </mask>
+            </variation>
+            <variation key="heightClass=regular-widthClass=compact">
+                <mask key="subviews">
+                    <include reference="4c3-gb-BwR"/>
+                    <include reference="sqq-aQ-dqD"/>
+                </mask>
+                <mask key="constraints">
+                    <include reference="0tG-Bd-2ic"/>
+                    <include reference="F9j-6m-8Sq"/>
+                    <include reference="JX5-Sx-hSJ"/>
+                    <include reference="TOG-yL-xSq"/>
+                    <include reference="uc7-M6-ZYJ"/>
+                    <include reference="wPB-Gl-TgQ"/>
+                    <include reference="J8W-3c-fXE"/>
+                    <include reference="Pfa-lH-sS7"/>
+                    <include reference="whE-VD-v7i"/>
+                </mask>
+            </variation>
+            <connections>
+                <outlet property="btnCancel" destination="EtP-9O-R3A" id="mr5-zY-bQM"/>
+                <outlet property="btnConfirm" destination="FKG-xS-HlM" id="zTF-29-eYq"/>
+                <outlet property="btnSunRise" destination="p2W-SQ-1PI" id="dwp-vx-QJe"/>
+                <outlet property="btnSunSet" destination="IuS-hc-CS1" id="yHe-hO-2EF"/>
+                <outlet property="constraintBtnConfirmWidth" destination="BNE-7a-kbD" id="C9m-XW-2MO"/>
+                <outlet property="containerView" destination="3Np-sH-ysD" id="uJs-dG-r2k"/>
+                <outlet property="lblCity" destination="bQW-Tp-LY8" id="bf1-mw-cyl"/>
+                <outlet property="lblTitle" destination="IE2-24-gHl" id="DFB-ut-ky2"/>
+                <outlet property="maskingView" destination="4c3-gb-BwR" id="9bJ-5l-qJq"/>
+                <outlet property="popUpView" destination="sqq-aQ-dqD" id="BCO-MT-Cf2"/>
+                <outletCollection property="chkDays" destination="gEc-zH-hzY" id="xQT-7d-0Gf"/>
+                <outletCollection property="chkDays" destination="zGy-bM-YLk" id="pnV-7Q-T7a"/>
+                <outletCollection property="chkDays" destination="gnm-iP-QY0" id="zoV-OK-ZES"/>
+                <outletCollection property="chkDays" destination="1Oy-jS-Ud8" id="WPx-6q-GCr"/>
+                <outletCollection property="chkDays" destination="o4f-q6-59K" id="sHf-4g-cJR"/>
+                <outletCollection property="chkDays" destination="q2d-7q-uU8" id="KAu-91-2Aw"/>
+                <outletCollection property="chkDays" destination="tEs-LC-Apx" id="b2c-2i-cq1"/>
+            </connections>
+            <point key="canvasLocation" x="218" y="300"/>
+        </view>
+    </objects>
+    <resources>
+        <image name="common_checkbox_default" width="25" height="25"/>
+    </resources>
+</document>

+ 33 - 0
kneet2/Classes/ViewControllers/ThingsScreens/ExternHeatPopupView.h

@@ -0,0 +1,33 @@
+//
+//  ExternHeatPopupView.h
+//  kneet2
+//
+//  Created by Jason Lee on 11/24/15.
+//  Copyright (c) 2015 ntels. All rights reserved.
+//
+
+@import UIKit;
+#import "CustomAlertView.h"
+#import "JDViewController.h"
+
+@class CustomCheckBox;
+
+@interface ExternHeatPopupView : CustomAlertView
+
+@property (weak, nonatomic) ItemModel *externHeatTrigger;
+
+//properties
+
+@property (strong, nonatomic) IBOutletCollection(CustomCheckBox) NSArray *chkDays;
+@property (weak, nonatomic) IBOutlet CustomButton *btnHot;
+@property (weak, nonatomic) IBOutlet CustomButton *btnCold;
+@property (weak, nonatomic) IBOutlet CustomLabel *lblCity;
+@property (weak, nonatomic) IBOutlet CustomLabel *lblHeat;
+
+//methods
+- (id)initFromNib;
+
+- (IBAction)btnHotTouched:(id)sender;
+- (IBAction)btnColdTouched:(id)sender;
+
+@end

+ 291 - 0
kneet2/Classes/ViewControllers/ThingsScreens/ExternHeatPopupView.m

@@ -0,0 +1,291 @@
+//
+//  ExternHeatPopupView.m
+//  kneet2
+//
+//  Created by Jason Lee on 11/24/15.
+//  Copyright (c) 2015 ntels. All rights reserved.
+//
+#import "JDObject.h"
+
+#import "ItemModel.h"
+#import "JDJSONModel.h"
+
+#import "CustomLabel.h"
+#import "CustomButton.h"
+#import "CustomCheckBox.h"
+#import "CommonUtil.h"
+
+#import "WeatherLocationPopupView.h"
+
+#import "ExternHeatPopupView.h"
+#import "RequestHandler.h"
+
+@interface ExternHeatPopupView () {
+    CommonCode *_weatherLocation;
+    NSArray<CommonCode> *_locations;
+    
+    WeatherLocationPopupView *_cpopup;
+}
+
+@end
+
+@implementation ExternHeatPopupView
+
+- (id)initFromNib {
+
+    for (UIView *view in [CommonUtil nibViews:@"ExternHeatPopupView"]) {
+        if ([view isKindOfClass:[ExternHeatPopupView class]]) {
+            self = (ExternHeatPopupView *)view;
+
+            ((CustomCheckBox *)_chkDays[0]).value = ksDayOfWeekMON;
+            ((CustomCheckBox *)_chkDays[1]).value = ksDayOfWeekTUE;
+            ((CustomCheckBox *)_chkDays[2]).value = ksDayOfWeekWED;
+            ((CustomCheckBox *)_chkDays[3]).value = ksDayOfWeekTHU;
+            ((CustomCheckBox *)_chkDays[4]).value = ksDayOfWeekFRI;
+            ((CustomCheckBox *)_chkDays[5]).value = ksDayOfWeekSAT;
+            ((CustomCheckBox *)_chkDays[6]).value = ksDayOfWeekSUN;
+            
+            
+            for (CustomCheckBox *chk in _chkDays) {
+                [self alignTextAndImageOfButton:chk];
+            }
+            
+            if (!_lblCity.touchHandler) {
+                [_lblCity addTouchEventHandler:^(id label) {
+                    [self lblCityTouched:label];
+                }];
+            }
+            
+            if (!_lblHeat.touchHandler) {
+                [_lblHeat addTouchEventHandler:^(id label) {
+                    [self lblHeatTouched:label];
+                }];
+            }
+            
+            //Localization
+            [self.btnConfirm setTitle:NSLocalizedString(@"확인", @"확인") forState:UIControlStateNormal];
+            [self.btnCancel setTitle:NSLocalizedString(@"취소", @"취소") forState:UIControlStateNormal];
+        }
+    }
+
+    return self;
+}
+
+
+- (void)alignTextAndImageOfButton:(UIButton *)button {
+    // the space between the image and text
+    CGFloat spacing = 6.0;
+    float textMargin = 0;
+    
+    // get the size of the elements here for readability
+    CGSize  imageSize   = button.imageView.image.size;
+    CGSize  titleSize   = button.titleLabel.frame.size;
+    CGFloat totalHeight = (imageSize.height + titleSize.height + spacing);      // get the height they will take up as a unit
+    
+    // lower the text and push it left to center it
+    button.titleEdgeInsets = UIEdgeInsetsMake( 0.0, -imageSize.width +textMargin, - (totalHeight - titleSize.height), +textMargin );   // top, left, bottom, right
+    
+    // the text width might have changed (in case it was shortened before due to
+    // lack of space and isn't anymore now), so we get the frame size again
+    titleSize = button.titleLabel.bounds.size;
+    
+    button.imageEdgeInsets = UIEdgeInsetsMake(25, 0.0, 0.0, -titleSize.width );     // top, left, bottom, right
+}
+
+
+- (void)setExternHeatTrigger:(ItemModel *)externHeatTrigger {
+    _externHeatTrigger = externHeatTrigger;
+
+    if (_externHeatTrigger.itemSubTypeCode && [_externHeatTrigger.itemSubTypeCode isEqualToString:ksItemSubTypeCodeHeat]) {//기존 데이터가 있을 경우,
+        ItemSubModel *subItem = _externHeatTrigger.heats[0];
+        
+        _btnHot.selected = [subItem.conditionTypeCode isEqualToString:@"05"];
+        _btnCold.selected = !_btnHot.selected;
+        
+    } else {//is new
+        
+        _externHeatTrigger.itemName = @"더울때 / 추울때";
+        _externHeatTrigger.itemSubTypeCode = ksItemSubTypeCodeHeat;
+        
+        _btnHot.selected = YES;
+        
+        for (CustomCheckBox *chk in _chkDays) {
+            chk.checked = YES;
+        }
+    }
+}
+
+
+- (void)didMoveToSuperview {
+    [self requestLocationCode];
+}
+
+#pragma mark - Main Logic
+
+- (void)requestLocationCode {
+    
+    NSString *path = [NSString stringWithFormat:API_GET_LOCATION_CODES];
+    
+    [[RequestHandler handler] sendAsyncGetRequestAPIPath:path parameters:nil modelClass:[CommonCodeList class] completion:^(id responseObject) {
+        if (!responseObject) {//응답결과가 잘못되었거나 없을 경우,
+            return;
+        }
+        
+        CommonCodeList *result = (CommonCodeList *) responseObject;
+        
+        if (result) {//API 성공 ,
+            _locations = result.list;
+            
+            [self setDefaultLocation];
+        }
+        
+    } failure:^(id errorObject) {
+        JDErrorModel *error = (JDErrorModel *)errorObject;
+        [[JDFacade facade] alert:error.errorMessage];
+    }];
+}
+
+- (void)setDefaultLocation {
+    for (CommonCode *code in _locations) {
+        if ([code.commonCodeName isEqualToString:@"서울"]) {
+            _weatherLocation = code;
+            
+            _lblCity.text = [NSString stringWithFormat:@"%@ 지역에", _weatherLocation.commonCodeName];
+            [_lblCity setUnderLine:_weatherLocation.commonCodeName];
+            break;
+        }
+    }
+}
+
+- (NSString *)stringOfDay:(NSInteger)index {
+    NSString *day = nil;
+    switch (index) {
+        case 0:
+            day = NSLocalizedString(@"월", @"월");
+            break;
+        case 1:
+            day = NSLocalizedString(@"화", @"화");
+            break;
+        case 2:
+            day = NSLocalizedString(@"수", @"수");
+            break;
+        case 3:
+            day = NSLocalizedString(@"목", @"목");
+            break;
+        case 4:
+            day = NSLocalizedString(@"금", @"금");
+            break;
+        case 5:
+            day = NSLocalizedString(@"토", @"토");
+            break;
+        case 6:
+            day = NSLocalizedString(@"일", @"일");
+            break;
+    }
+    return day;
+}
+
+- (NSString *)daysOfWeek {
+    //dayOfWeek
+    NSMutableString *days = [[NSMutableString alloc] init];
+    
+    NSInteger i = 0;
+    for (CustomCheckBox *chk in _chkDays) {
+        if (chk.checked) {
+            NSString *prefix = [days isEmptyString] ? ksEmptyString : @", ";
+            [days appendFormat:@"%@%@", prefix, [self stringOfDay:i]];
+        }
+        i++;
+    }
+    return days;
+}
+
+- (NSString *)cmdClsValue {
+    NSMutableString *days = [[NSMutableString alloc] init];
+    
+    for (CustomCheckBox *chk in _chkDays) {
+        if (chk.checked) {
+            NSString *prefix = [days isEmptyString] ? ksEmptyString : @",";
+            [days appendFormat:@"%@%@", prefix, chk.value];
+        }
+    }
+    return days;
+}
+
+#pragma mark - UI Events
+
+- (IBAction)btnHotTouched:(id)sender {
+    _btnHot.selected = YES;
+    _btnCold.selected = NO;
+}
+
+- (IBAction)btnColdTouched:(id)sender {
+    _btnHot.selected = NO;
+    _btnCold.selected = YES;
+}
+
+- (void)lblCityTouched:(id)sender {
+    
+    if (!_cpopup) {
+        _cpopup = [[WeatherLocationPopupView alloc] initFromNib];
+        _cpopup.locations = _locations;
+    }
+    
+    [_cpopup showWithCompletion:^(CustomAlertView *alertView, NSInteger buttonIndex) {
+        if (buttonIndex == 0) {
+            _weatherLocation = _cpopup.weatherLocation;
+            
+            _lblCity.text = [NSString stringWithFormat:@"%@ 지역에", _weatherLocation.commonCodeName];
+            [_lblCity setUnderLine:_weatherLocation.commonCodeName];
+        }
+    }];
+}
+
+- (void)lblHeatTouched:(id)sender {
+    
+}
+
+- (BOOL)validateCondition {
+    
+    //1.validate
+    NSInteger count = 0;
+    for (CustomCheckBox *chk in _chkDays) {
+        if (chk.checked) {
+            count++;
+        }
+    }
+    
+    //1. validate
+    if (count == 0) {
+        [[JDFacade facade] alert:NSLocalizedString(@"요일을 선택해주세요", @"요일을 선택해주세요")];
+    }
+    return count;
+}
+
+- (IBAction)btnConfirmTouched:(id)sender {
+    //validate
+    if (![self validateCondition]) {
+        return;
+    }
+
+    ItemSubModel *subItem = nil;
+    if (_externHeatTrigger.subItems && _externHeatTrigger.subItems.count) {
+        subItem = _externHeatTrigger.subItems[0];
+    } else {
+        subItem = [[ItemSubModel alloc] init];
+        
+        _externHeatTrigger.heats = (NSMutableArray<ItemSubModel> *)[[NSMutableArray alloc] init];
+        [_externHeatTrigger.heats addObject:subItem];
+    }
+
+
+    //daylights
+    subItem.sourceId = _weatherLocation.commonCode;
+    subItem.sourceName = _weatherLocation.commonCodeName;
+    subItem.cmdclsValue = [self cmdClsValue]; //온도값.
+    subItem.daysOfWeek = [self daysOfWeek];
+    
+    [super btnConfirmTouched:sender];
+}
+
+@end

+ 840 - 0
kneet2/Classes/ViewControllers/ThingsScreens/ExternHeatPopupView.xib

@@ -0,0 +1,840 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9060" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="qLf-va-EAG" customClass="ExternHeatPopupView">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <view alpha="0.29999999999999999" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4c3-gb-BwR" userLabel="maskView">
+                    <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                    <animations/>
+                    <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
+                </view>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sqq-aQ-dqD" userLabel="popUpView">
+                    <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                    <subviews>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3Np-sH-ysD" userLabel="ContainerView">
+                            <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                            <subviews>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7nf-Ia-7Kq" userLabel="View - Title">
+                                    <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                                    <subviews>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="더울때 / 추울때" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IE2-24-gHl" customClass="CustomLabel">
+                                            <rect key="frame" x="0.0" y="-21" width="42" height="21"/>
+                                            <animations/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="64" id="gmY-Rb-Qao"/>
+                                            </constraints>
+                                            <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
+                                            <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                            <nil key="highlightedColor"/>
+                                            <variation key="default">
+                                                <mask key="constraints">
+                                                    <exclude reference="gmY-Rb-Qao"/>
+                                                </mask>
+                                            </variation>
+                                            <variation key="heightClass=regular-widthClass=compact">
+                                                <mask key="constraints">
+                                                    <include reference="gmY-Rb-Qao"/>
+                                                </mask>
+                                            </variation>
+                                        </label>
+                                    </subviews>
+                                    <animations/>
+                                    <color key="backgroundColor" red="0.95686274510000002" green="0.30588235289999999" blue="0.3294117647" alpha="1" colorSpace="calibratedRGB"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="44" id="1fj-XN-uH0">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="64"/>
+                                        </constraint>
+                                        <constraint firstItem="IE2-24-gHl" firstAttribute="leading" secondItem="7nf-Ia-7Kq" secondAttribute="leading" id="98Q-bq-Oq7">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="20"/>
+                                        </constraint>
+                                        <constraint firstItem="IE2-24-gHl" firstAttribute="top" secondItem="7nf-Ia-7Kq" secondAttribute="top" id="Ldj-nV-yrM">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                                        </constraint>
+                                        <constraint firstAttribute="trailing" secondItem="IE2-24-gHl" secondAttribute="trailing" id="mUY-4l-GjT">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="-8"/>
+                                        </constraint>
+                                        <constraint firstAttribute="bottom" secondItem="IE2-24-gHl" secondAttribute="bottom" id="yzV-EQ-HeM">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                                        </constraint>
+                                    </constraints>
+                                    <variation key="default">
+                                        <mask key="subviews">
+                                            <exclude reference="IE2-24-gHl"/>
+                                        </mask>
+                                        <mask key="constraints">
+                                            <exclude reference="1fj-XN-uH0"/>
+                                            <exclude reference="98Q-bq-Oq7"/>
+                                            <exclude reference="Ldj-nV-yrM"/>
+                                            <exclude reference="mUY-4l-GjT"/>
+                                            <exclude reference="yzV-EQ-HeM"/>
+                                        </mask>
+                                    </variation>
+                                    <variation key="heightClass=regular-widthClass=compact">
+                                        <mask key="subviews">
+                                            <include reference="IE2-24-gHl"/>
+                                        </mask>
+                                        <mask key="constraints">
+                                            <exclude reference="1fj-XN-uH0"/>
+                                            <include reference="98Q-bq-Oq7"/>
+                                            <include reference="Ldj-nV-yrM"/>
+                                            <include reference="mUY-4l-GjT"/>
+                                            <include reference="yzV-EQ-HeM"/>
+                                        </mask>
+                                    </variation>
+                                </view>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Mw5-GF-3oQ" userLabel="View - message">
+                                    <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                                    <subviews>
+                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZLi-Se-du7" userLabel="View - days">
+                                            <rect key="frame" x="0.0" y="0.0" width="240" height="128"/>
+                                            <subviews>
+                                                <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="zGy-bM-YLk" customClass="CustomCheckBox">
+                                                    <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                    <animations/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="36" id="BJY-KH-1tY">
+                                                            <variation key="heightClass=regular-widthClass=compact" constant="40"/>
+                                                        </constraint>
+                                                        <constraint firstAttribute="height" constant="50" id="k2r-na-9Bg"/>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
+                                                    <inset key="titleEdgeInsets" minX="-26" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                                    <inset key="imageEdgeInsets" minX="6" minY="25" maxX="0.0" maxY="0.0"/>
+                                                    <state key="normal" title="SUN" image="common_checkbox_default">
+                                                        <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                                    </state>
+                                                    <state key="highlighted">
+                                                        <color key="titleColor" red="0.96470588239999999" green="0.27058823529999998" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
+                                                    </state>
+                                                    <variation key="default">
+                                                        <mask key="constraints">
+                                                            <exclude reference="BJY-KH-1tY"/>
+                                                            <exclude reference="k2r-na-9Bg"/>
+                                                        </mask>
+                                                    </variation>
+                                                    <variation key="heightClass=regular-widthClass=compact">
+                                                        <mask key="constraints">
+                                                            <include reference="BJY-KH-1tY"/>
+                                                            <include reference="k2r-na-9Bg"/>
+                                                        </mask>
+                                                    </variation>
+                                                </button>
+                                                <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1Oy-jS-Ud8" customClass="CustomCheckBox">
+                                                    <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                    <animations/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="50" id="PJV-EI-OpY"/>
+                                                        <constraint firstAttribute="width" constant="36" id="WBc-Ic-YW2">
+                                                            <variation key="heightClass=regular-widthClass=compact" constant="40"/>
+                                                        </constraint>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
+                                                    <inset key="titleEdgeInsets" minX="-26" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                                    <inset key="imageEdgeInsets" minX="8" minY="25" maxX="0.0" maxY="0.0"/>
+                                                    <state key="normal" title="MON" image="common_checkbox_default">
+                                                        <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                                    </state>
+                                                    <state key="highlighted">
+                                                        <color key="titleColor" red="0.96470588239999999" green="0.27058823529999998" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
+                                                    </state>
+                                                    <variation key="default">
+                                                        <mask key="constraints">
+                                                            <exclude reference="PJV-EI-OpY"/>
+                                                            <exclude reference="WBc-Ic-YW2"/>
+                                                        </mask>
+                                                    </variation>
+                                                    <variation key="heightClass=regular-widthClass=compact">
+                                                        <mask key="constraints">
+                                                            <include reference="PJV-EI-OpY"/>
+                                                            <include reference="WBc-Ic-YW2"/>
+                                                        </mask>
+                                                    </variation>
+                                                </button>
+                                                <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tEs-LC-Apx" customClass="CustomCheckBox">
+                                                    <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                    <animations/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="36" id="Org-up-Glu">
+                                                            <variation key="heightClass=regular-widthClass=compact" constant="40"/>
+                                                        </constraint>
+                                                        <constraint firstAttribute="height" constant="50" id="bSk-1m-ZS2"/>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
+                                                    <inset key="titleEdgeInsets" minX="-26" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                                    <inset key="imageEdgeInsets" minX="6" minY="25" maxX="0.0" maxY="0.0"/>
+                                                    <state key="normal" title="TUE" image="common_checkbox_default">
+                                                        <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                                    </state>
+                                                    <state key="highlighted">
+                                                        <color key="titleColor" red="0.96470588239999999" green="0.27058823529999998" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
+                                                    </state>
+                                                    <variation key="default">
+                                                        <mask key="constraints">
+                                                            <exclude reference="Org-up-Glu"/>
+                                                            <exclude reference="bSk-1m-ZS2"/>
+                                                        </mask>
+                                                    </variation>
+                                                    <variation key="heightClass=regular-widthClass=compact">
+                                                        <mask key="constraints">
+                                                            <include reference="Org-up-Glu"/>
+                                                            <include reference="bSk-1m-ZS2"/>
+                                                        </mask>
+                                                    </variation>
+                                                </button>
+                                                <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="q2d-7q-uU8" customClass="CustomCheckBox">
+                                                    <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                    <animations/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="50" id="2ch-WH-dIs"/>
+                                                        <constraint firstAttribute="width" constant="36" id="9Ph-Xu-0TP">
+                                                            <variation key="heightClass=regular-widthClass=compact" constant="40"/>
+                                                        </constraint>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
+                                                    <inset key="titleEdgeInsets" minX="-26" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                                    <inset key="imageEdgeInsets" minX="6" minY="25" maxX="0.0" maxY="0.0"/>
+                                                    <state key="normal" title="WED" image="common_checkbox_default">
+                                                        <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                                    </state>
+                                                    <state key="highlighted">
+                                                        <color key="titleColor" red="0.96470588239999999" green="0.27058823529999998" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
+                                                    </state>
+                                                    <variation key="default">
+                                                        <mask key="constraints">
+                                                            <exclude reference="2ch-WH-dIs"/>
+                                                            <exclude reference="9Ph-Xu-0TP"/>
+                                                        </mask>
+                                                    </variation>
+                                                    <variation key="heightClass=regular-widthClass=compact">
+                                                        <mask key="constraints">
+                                                            <include reference="2ch-WH-dIs"/>
+                                                            <include reference="9Ph-Xu-0TP"/>
+                                                        </mask>
+                                                    </variation>
+                                                </button>
+                                                <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gnm-iP-QY0" customClass="CustomCheckBox">
+                                                    <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                    <animations/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="36" id="Vlv-Ms-WHn">
+                                                            <variation key="heightClass=regular-widthClass=compact" constant="40"/>
+                                                        </constraint>
+                                                        <constraint firstAttribute="height" constant="50" id="tau-FB-ZEc"/>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
+                                                    <inset key="titleEdgeInsets" minX="-26" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                                    <inset key="imageEdgeInsets" minX="6" minY="25" maxX="0.0" maxY="0.0"/>
+                                                    <state key="normal" title="THU" image="common_checkbox_default">
+                                                        <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                                    </state>
+                                                    <state key="highlighted">
+                                                        <color key="titleColor" red="0.96470588239999999" green="0.27058823529999998" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
+                                                    </state>
+                                                    <variation key="default">
+                                                        <mask key="constraints">
+                                                            <exclude reference="Vlv-Ms-WHn"/>
+                                                            <exclude reference="tau-FB-ZEc"/>
+                                                        </mask>
+                                                    </variation>
+                                                    <variation key="heightClass=regular-widthClass=compact">
+                                                        <mask key="constraints">
+                                                            <include reference="Vlv-Ms-WHn"/>
+                                                            <include reference="tau-FB-ZEc"/>
+                                                        </mask>
+                                                    </variation>
+                                                </button>
+                                                <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gEc-zH-hzY" customClass="CustomCheckBox">
+                                                    <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                    <animations/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="50" id="Stm-DZ-sIz"/>
+                                                        <constraint firstAttribute="width" constant="36" id="Zq5-Sg-gCK">
+                                                            <variation key="heightClass=regular-widthClass=compact" constant="40"/>
+                                                        </constraint>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
+                                                    <inset key="titleEdgeInsets" minX="-26" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                                    <inset key="imageEdgeInsets" minX="6" minY="25" maxX="0.0" maxY="0.0"/>
+                                                    <state key="normal" title="FRI" image="common_checkbox_default">
+                                                        <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                                    </state>
+                                                    <state key="highlighted">
+                                                        <color key="titleColor" red="0.96470588239999999" green="0.27058823529999998" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
+                                                    </state>
+                                                    <variation key="default">
+                                                        <mask key="constraints">
+                                                            <exclude reference="Stm-DZ-sIz"/>
+                                                            <exclude reference="Zq5-Sg-gCK"/>
+                                                        </mask>
+                                                    </variation>
+                                                    <variation key="heightClass=regular-widthClass=compact">
+                                                        <mask key="constraints">
+                                                            <include reference="Stm-DZ-sIz"/>
+                                                            <include reference="Zq5-Sg-gCK"/>
+                                                        </mask>
+                                                    </variation>
+                                                </button>
+                                                <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="o4f-q6-59K" customClass="CustomCheckBox">
+                                                    <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                    <animations/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="50" id="XPv-d7-MIX"/>
+                                                        <constraint firstAttribute="width" constant="36" id="nYI-Nu-P6l">
+                                                            <variation key="heightClass=regular-widthClass=compact" constant="40"/>
+                                                        </constraint>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
+                                                    <inset key="titleEdgeInsets" minX="-26" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                                    <inset key="imageEdgeInsets" minX="6" minY="25" maxX="0.0" maxY="0.0"/>
+                                                    <state key="normal" title="SAT" image="common_checkbox_default">
+                                                        <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                                    </state>
+                                                    <state key="highlighted">
+                                                        <color key="titleColor" red="0.96470588239999999" green="0.27058823529999998" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
+                                                    </state>
+                                                    <variation key="default">
+                                                        <mask key="constraints">
+                                                            <exclude reference="XPv-d7-MIX"/>
+                                                            <exclude reference="nYI-Nu-P6l"/>
+                                                        </mask>
+                                                    </variation>
+                                                    <variation key="heightClass=regular-widthClass=compact">
+                                                        <mask key="constraints">
+                                                            <include reference="XPv-d7-MIX"/>
+                                                            <include reference="nYI-Nu-P6l"/>
+                                                        </mask>
+                                                    </variation>
+                                                </button>
+                                            </subviews>
+                                            <animations/>
+                                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                            <constraints>
+                                                <constraint firstItem="tEs-LC-Apx" firstAttribute="leading" secondItem="1Oy-jS-Ud8" secondAttribute="trailing" id="2QB-ji-wZE"/>
+                                                <constraint firstItem="tEs-LC-Apx" firstAttribute="centerY" secondItem="1Oy-jS-Ud8" secondAttribute="centerY" id="Fft-qq-bZn"/>
+                                                <constraint firstAttribute="height" constant="50" id="FtA-7U-SSB"/>
+                                                <constraint firstItem="1Oy-jS-Ud8" firstAttribute="leading" secondItem="ZLi-Se-du7" secondAttribute="leading" constant="5" id="GpP-m8-6VH">
+                                                    <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                                                </constraint>
+                                                <constraint firstItem="tEs-LC-Apx" firstAttribute="centerY" secondItem="q2d-7q-uU8" secondAttribute="centerY" id="NcT-o2-E4s"/>
+                                                <constraint firstItem="zGy-bM-YLk" firstAttribute="leading" secondItem="o4f-q6-59K" secondAttribute="trailing" id="NlM-oU-U4q"/>
+                                                <constraint firstItem="1Oy-jS-Ud8" firstAttribute="top" secondItem="ZLi-Se-du7" secondAttribute="top" id="PUa-PM-zqn"/>
+                                                <constraint firstItem="gEc-zH-hzY" firstAttribute="centerY" secondItem="o4f-q6-59K" secondAttribute="centerY" id="RSf-w4-s9j"/>
+                                                <constraint firstItem="gnm-iP-QY0" firstAttribute="leading" secondItem="q2d-7q-uU8" secondAttribute="trailing" id="SKq-i7-LoV"/>
+                                                <constraint firstItem="q2d-7q-uU8" firstAttribute="centerY" secondItem="gnm-iP-QY0" secondAttribute="centerY" id="aMH-w7-y8I"/>
+                                                <constraint firstItem="zGy-bM-YLk" firstAttribute="centerY" secondItem="o4f-q6-59K" secondAttribute="centerY" id="g06-pK-BuC"/>
+                                                <constraint firstItem="q2d-7q-uU8" firstAttribute="leading" secondItem="tEs-LC-Apx" secondAttribute="trailing" id="grt-Ny-anD"/>
+                                                <constraint firstItem="gEc-zH-hzY" firstAttribute="leading" secondItem="gnm-iP-QY0" secondAttribute="trailing" id="hRL-CP-iPT"/>
+                                                <constraint firstItem="gnm-iP-QY0" firstAttribute="centerY" secondItem="gEc-zH-hzY" secondAttribute="centerY" id="sNq-bS-KDt"/>
+                                                <constraint firstItem="o4f-q6-59K" firstAttribute="leading" secondItem="gEc-zH-hzY" secondAttribute="trailing" id="u62-rv-3Ha"/>
+                                            </constraints>
+                                            <variation key="default">
+                                                <mask key="subviews">
+                                                    <exclude reference="zGy-bM-YLk"/>
+                                                    <exclude reference="1Oy-jS-Ud8"/>
+                                                    <exclude reference="tEs-LC-Apx"/>
+                                                    <exclude reference="q2d-7q-uU8"/>
+                                                    <exclude reference="gnm-iP-QY0"/>
+                                                    <exclude reference="gEc-zH-hzY"/>
+                                                    <exclude reference="o4f-q6-59K"/>
+                                                </mask>
+                                                <mask key="constraints">
+                                                    <exclude reference="FtA-7U-SSB"/>
+                                                    <exclude reference="GpP-m8-6VH"/>
+                                                    <exclude reference="PUa-PM-zqn"/>
+                                                    <exclude reference="RSf-w4-s9j"/>
+                                                    <exclude reference="hRL-CP-iPT"/>
+                                                    <exclude reference="SKq-i7-LoV"/>
+                                                    <exclude reference="sNq-bS-KDt"/>
+                                                    <exclude reference="u62-rv-3Ha"/>
+                                                    <exclude reference="aMH-w7-y8I"/>
+                                                    <exclude reference="grt-Ny-anD"/>
+                                                    <exclude reference="2QB-ji-wZE"/>
+                                                    <exclude reference="Fft-qq-bZn"/>
+                                                    <exclude reference="NcT-o2-E4s"/>
+                                                    <exclude reference="NlM-oU-U4q"/>
+                                                    <exclude reference="g06-pK-BuC"/>
+                                                </mask>
+                                            </variation>
+                                            <variation key="heightClass=regular-widthClass=compact">
+                                                <mask key="subviews">
+                                                    <include reference="zGy-bM-YLk"/>
+                                                    <include reference="1Oy-jS-Ud8"/>
+                                                    <include reference="tEs-LC-Apx"/>
+                                                    <include reference="q2d-7q-uU8"/>
+                                                    <include reference="gnm-iP-QY0"/>
+                                                    <include reference="gEc-zH-hzY"/>
+                                                    <include reference="o4f-q6-59K"/>
+                                                </mask>
+                                                <mask key="constraints">
+                                                    <include reference="FtA-7U-SSB"/>
+                                                    <include reference="GpP-m8-6VH"/>
+                                                    <include reference="PUa-PM-zqn"/>
+                                                    <include reference="RSf-w4-s9j"/>
+                                                    <include reference="hRL-CP-iPT"/>
+                                                    <include reference="SKq-i7-LoV"/>
+                                                    <include reference="sNq-bS-KDt"/>
+                                                    <include reference="u62-rv-3Ha"/>
+                                                    <include reference="aMH-w7-y8I"/>
+                                                    <include reference="grt-Ny-anD"/>
+                                                    <include reference="2QB-ji-wZE"/>
+                                                    <include reference="Fft-qq-bZn"/>
+                                                    <include reference="NcT-o2-E4s"/>
+                                                    <include reference="NlM-oU-U4q"/>
+                                                    <include reference="g06-pK-BuC"/>
+                                                </mask>
+                                            </variation>
+                                        </view>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="야후 웨더 연동" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nWV-Nb-Kmi" customClass="CustomLabel">
+                                            <rect key="frame" x="-42" y="-21" width="42" height="21"/>
+                                            <animations/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="15" id="lRB-LX-fu5"/>
+                                            </constraints>
+                                            <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                            <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
+                                            <nil key="highlightedColor"/>
+                                            <variation key="default">
+                                                <mask key="constraints">
+                                                    <exclude reference="lRB-LX-fu5"/>
+                                                </mask>
+                                            </variation>
+                                            <variation key="heightClass=regular-widthClass=compact">
+                                                <mask key="constraints">
+                                                    <include reference="lRB-LX-fu5"/>
+                                                </mask>
+                                            </variation>
+                                        </label>
+                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="p2W-SQ-1PI" customClass="CustomButton">
+                                            <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                            <animations/>
+                                            <constraints>
+                                                <constraint firstAttribute="width" constant="110" id="emw-1h-UQK"/>
+                                                <constraint firstAttribute="height" constant="30" id="mNo-pW-Fzr"/>
+                                            </constraints>
+                                            <fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
+                                            <state key="normal" title="더울때"/>
+                                            <variation key="default">
+                                                <mask key="constraints">
+                                                    <exclude reference="emw-1h-UQK"/>
+                                                    <exclude reference="mNo-pW-Fzr"/>
+                                                </mask>
+                                            </variation>
+                                            <variation key="heightClass=regular-widthClass=compact">
+                                                <mask key="constraints">
+                                                    <include reference="emw-1h-UQK"/>
+                                                    <include reference="mNo-pW-Fzr"/>
+                                                </mask>
+                                            </variation>
+                                            <connections>
+                                                <action selector="btnHotTouched:" destination="qLf-va-EAG" eventType="touchUpInside" id="h1o-rb-hZX"/>
+                                            </connections>
+                                        </button>
+                                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" buttonType="roundedRect" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="IuS-hc-CS1" customClass="CustomButton">
+                                            <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                            <animations/>
+                                            <fontDescription key="fontDescription" type="boldSystem" pointSize="16"/>
+                                            <state key="normal" title="추울때"/>
+                                            <connections>
+                                                <action selector="btnColdTouched:" destination="qLf-va-EAG" eventType="touchUpInside" id="jjx-o4-ViB"/>
+                                            </connections>
+                                        </button>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="249" verticalHuggingPriority="249" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9dY-hn-QRa" customClass="CustomLabel">
+                                            <rect key="frame" x="-42" y="-21" width="42" height="21"/>
+                                            <animations/>
+                                            <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                                            <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
+                                            <nil key="highlightedColor"/>
+                                        </label>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bQW-Tp-LY8" customClass="CustomLabel">
+                                            <rect key="frame" x="-42" y="-21" width="42" height="21"/>
+                                            <animations/>
+                                            <fontDescription key="fontDescription" type="system" pointSize="16"/>
+                                            <color key="textColor" white="0.33333333333333331" alpha="1" colorSpace="calibratedWhite"/>
+                                            <nil key="highlightedColor"/>
+                                        </label>
+                                    </subviews>
+                                    <animations/>
+                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                    <constraints>
+                                        <constraint firstItem="p2W-SQ-1PI" firstAttribute="leading" secondItem="Mw5-GF-3oQ" secondAttribute="leading" constant="30" id="09I-i0-TVv"/>
+                                        <constraint firstAttribute="trailing" secondItem="nWV-Nb-Kmi" secondAttribute="trailing" constant="15" id="6as-n0-hha"/>
+                                        <constraint firstItem="IuS-hc-CS1" firstAttribute="height" secondItem="p2W-SQ-1PI" secondAttribute="height" id="7Dm-3a-Fd1"/>
+                                        <constraint firstAttribute="bottom" secondItem="ZLi-Se-du7" secondAttribute="bottom" constant="25" id="8Yh-yb-IuI"/>
+                                        <constraint firstItem="IuS-hc-CS1" firstAttribute="width" secondItem="p2W-SQ-1PI" secondAttribute="width" id="B2n-qp-qpP"/>
+                                        <constraint firstItem="p2W-SQ-1PI" firstAttribute="top" secondItem="nWV-Nb-Kmi" secondAttribute="bottom" constant="40" id="F08-wm-xBG"/>
+                                        <constraint firstItem="IuS-hc-CS1" firstAttribute="leading" secondItem="p2W-SQ-1PI" secondAttribute="trailing" constant="10" id="JIn-So-348"/>
+                                        <constraint firstItem="ZLi-Se-du7" firstAttribute="leading" secondItem="Mw5-GF-3oQ" secondAttribute="leading" id="Jeq-dm-hZR">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="10"/>
+                                        </constraint>
+                                        <constraint firstItem="9dY-hn-QRa" firstAttribute="width" secondItem="bQW-Tp-LY8" secondAttribute="width" id="MUo-Sj-Dig"/>
+                                        <constraint firstItem="nWV-Nb-Kmi" firstAttribute="top" secondItem="Mw5-GF-3oQ" secondAttribute="top" constant="20" id="N0x-yA-A3e"/>
+                                        <constraint firstItem="ZLi-Se-du7" firstAttribute="top" secondItem="9dY-hn-QRa" secondAttribute="bottom" constant="40" id="Nms-F0-CPk"/>
+                                        <constraint firstItem="9dY-hn-QRa" firstAttribute="top" secondItem="IuS-hc-CS1" secondAttribute="bottom" constant="40" id="OZb-NB-EKi"/>
+                                        <constraint firstItem="ZLi-Se-du7" firstAttribute="top" secondItem="bQW-Tp-LY8" secondAttribute="bottom" constant="40" id="Qzr-Ha-iVN"/>
+                                        <constraint firstAttribute="trailing" secondItem="9dY-hn-QRa" secondAttribute="trailing" constant="30" id="b9c-XD-1q9"/>
+                                        <constraint firstItem="bQW-Tp-LY8" firstAttribute="leading" secondItem="Mw5-GF-3oQ" secondAttribute="leading" constant="30" id="fmC-wN-uF8"/>
+                                        <constraint firstItem="IuS-hc-CS1" firstAttribute="centerY" secondItem="p2W-SQ-1PI" secondAttribute="centerY" id="hjf-qu-9gQ"/>
+                                        <constraint firstItem="bQW-Tp-LY8" firstAttribute="top" secondItem="p2W-SQ-1PI" secondAttribute="bottom" constant="40" id="idm-Sn-5Xl"/>
+                                        <constraint firstAttribute="trailing" secondItem="IuS-hc-CS1" secondAttribute="trailing" constant="30" id="lZB-Nn-rJi"/>
+                                        <constraint firstItem="nWV-Nb-Kmi" firstAttribute="leading" secondItem="Mw5-GF-3oQ" secondAttribute="leading" constant="15" id="mhc-oe-5Ox"/>
+                                        <constraint firstItem="9dY-hn-QRa" firstAttribute="leading" secondItem="bQW-Tp-LY8" secondAttribute="trailing" id="oc9-pS-aeB"/>
+                                        <constraint firstAttribute="trailing" secondItem="ZLi-Se-du7" secondAttribute="trailing" id="qou-uS-gii">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                                        </constraint>
+                                    </constraints>
+                                    <variation key="default">
+                                        <mask key="subviews">
+                                            <exclude reference="ZLi-Se-du7"/>
+                                            <exclude reference="nWV-Nb-Kmi"/>
+                                            <exclude reference="p2W-SQ-1PI"/>
+                                            <exclude reference="IuS-hc-CS1"/>
+                                            <exclude reference="9dY-hn-QRa"/>
+                                            <exclude reference="bQW-Tp-LY8"/>
+                                        </mask>
+                                        <mask key="constraints">
+                                            <exclude reference="6as-n0-hha"/>
+                                            <exclude reference="N0x-yA-A3e"/>
+                                            <exclude reference="mhc-oe-5Ox"/>
+                                            <exclude reference="09I-i0-TVv"/>
+                                            <exclude reference="F08-wm-xBG"/>
+                                            <exclude reference="fmC-wN-uF8"/>
+                                            <exclude reference="idm-Sn-5Xl"/>
+                                            <exclude reference="7Dm-3a-Fd1"/>
+                                            <exclude reference="B2n-qp-qpP"/>
+                                            <exclude reference="JIn-So-348"/>
+                                            <exclude reference="hjf-qu-9gQ"/>
+                                            <exclude reference="lZB-Nn-rJi"/>
+                                            <exclude reference="MUo-Sj-Dig"/>
+                                            <exclude reference="OZb-NB-EKi"/>
+                                            <exclude reference="b9c-XD-1q9"/>
+                                            <exclude reference="oc9-pS-aeB"/>
+                                            <exclude reference="8Yh-yb-IuI"/>
+                                            <exclude reference="Jeq-dm-hZR"/>
+                                            <exclude reference="Nms-F0-CPk"/>
+                                            <exclude reference="Qzr-Ha-iVN"/>
+                                            <exclude reference="qou-uS-gii"/>
+                                        </mask>
+                                    </variation>
+                                    <variation key="heightClass=regular-widthClass=compact">
+                                        <mask key="subviews">
+                                            <include reference="ZLi-Se-du7"/>
+                                            <include reference="nWV-Nb-Kmi"/>
+                                            <include reference="p2W-SQ-1PI"/>
+                                            <include reference="IuS-hc-CS1"/>
+                                            <include reference="9dY-hn-QRa"/>
+                                            <include reference="bQW-Tp-LY8"/>
+                                        </mask>
+                                        <mask key="constraints">
+                                            <include reference="6as-n0-hha"/>
+                                            <include reference="N0x-yA-A3e"/>
+                                            <include reference="mhc-oe-5Ox"/>
+                                            <include reference="09I-i0-TVv"/>
+                                            <include reference="F08-wm-xBG"/>
+                                            <include reference="fmC-wN-uF8"/>
+                                            <include reference="idm-Sn-5Xl"/>
+                                            <include reference="7Dm-3a-Fd1"/>
+                                            <include reference="B2n-qp-qpP"/>
+                                            <include reference="JIn-So-348"/>
+                                            <include reference="hjf-qu-9gQ"/>
+                                            <include reference="lZB-Nn-rJi"/>
+                                            <include reference="MUo-Sj-Dig"/>
+                                            <include reference="OZb-NB-EKi"/>
+                                            <include reference="b9c-XD-1q9"/>
+                                            <include reference="oc9-pS-aeB"/>
+                                            <include reference="8Yh-yb-IuI"/>
+                                            <include reference="Jeq-dm-hZR"/>
+                                            <include reference="Nms-F0-CPk"/>
+                                            <include reference="Qzr-Ha-iVN"/>
+                                            <include reference="qou-uS-gii"/>
+                                        </mask>
+                                    </variation>
+                                </view>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bIs-li-8bz" userLabel="View - Buttons">
+                                    <rect key="frame" x="-20" y="156" width="338" height="90"/>
+                                    <subviews>
+                                        <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="145" placeholderIntrinsicHeight="70" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FKG-xS-HlM" customClass="CustomButton">
+                                            <rect key="frame" x="20" y="20" width="149" height="50"/>
+                                            <animations/>
+                                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                            <constraints>
+                                                <constraint firstAttribute="width" relation="greaterThanOrEqual" id="BNE-7a-kbD"/>
+                                            </constraints>
+                                            <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                                            <state key="normal" title="확인">
+                                                <color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
+                                                <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                            </state>
+                                            <state key="highlighted">
+                                                <color key="titleColor" red="0.73601246840000001" green="0.3682315451" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
+                                            </state>
+                                            <variation key="default">
+                                                <mask key="constraints">
+                                                    <exclude reference="BNE-7a-kbD"/>
+                                                </mask>
+                                            </variation>
+                                            <variation key="heightClass=regular-widthClass=compact">
+                                                <mask key="constraints">
+                                                    <include reference="BNE-7a-kbD"/>
+                                                </mask>
+                                            </variation>
+                                            <connections>
+                                                <action selector="btnConfirmTouched:" destination="qLf-va-EAG" eventType="touchUpInside" id="JvU-lL-1vP"/>
+                                            </connections>
+                                        </button>
+                                        <button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="249" horizontalCompressionResistancePriority="749" placeholderIntrinsicWidth="144" placeholderIntrinsicHeight="70" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="EtP-9O-R3A" customClass="CustomButton">
+                                            <rect key="frame" x="170" y="20" width="148" height="50"/>
+                                            <animations/>
+                                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="44" id="L9v-r3-6MJ">
+                                                    <variation key="heightClass=regular-widthClass=compact" constant="50"/>
+                                                </constraint>
+                                            </constraints>
+                                            <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                                            <state key="normal" title="취소">
+                                                <color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
+                                                <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                            </state>
+                                            <variation key="default">
+                                                <mask key="constraints">
+                                                    <exclude reference="L9v-r3-6MJ"/>
+                                                </mask>
+                                            </variation>
+                                            <variation key="heightClass=regular-widthClass=compact">
+                                                <mask key="constraints">
+                                                    <exclude reference="L9v-r3-6MJ"/>
+                                                </mask>
+                                            </variation>
+                                            <connections>
+                                                <action selector="btnCancelTouched:" destination="qLf-va-EAG" eventType="touchUpInside" id="g5k-Tn-E33"/>
+                                            </connections>
+                                        </button>
+                                    </subviews>
+                                    <animations/>
+                                    <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                    <constraints>
+                                        <constraint firstItem="FKG-xS-HlM" firstAttribute="leading" secondItem="bIs-li-8bz" secondAttribute="leading" id="Fkf-og-ytd"/>
+                                        <constraint firstAttribute="trailing" secondItem="EtP-9O-R3A" secondAttribute="trailing" id="PjC-cB-YfR"/>
+                                        <constraint firstItem="FKG-xS-HlM" firstAttribute="top" secondItem="bIs-li-8bz" secondAttribute="top" constant="1" id="hu2-xM-w64"/>
+                                        <constraint firstAttribute="bottom" secondItem="FKG-xS-HlM" secondAttribute="bottom" id="l9l-jK-cst"/>
+                                        <constraint firstItem="EtP-9O-R3A" firstAttribute="width" secondItem="FKG-xS-HlM" secondAttribute="width" id="qJo-Xg-EhL">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="-1"/>
+                                        </constraint>
+                                        <constraint firstItem="EtP-9O-R3A" firstAttribute="leading" secondItem="FKG-xS-HlM" secondAttribute="trailing" constant="1" id="rpW-dL-KWs"/>
+                                        <constraint firstAttribute="bottom" secondItem="EtP-9O-R3A" secondAttribute="bottom" id="sQC-dK-bJs"/>
+                                        <constraint firstItem="EtP-9O-R3A" firstAttribute="top" secondItem="bIs-li-8bz" secondAttribute="top" constant="1" id="xsM-oo-x8a"/>
+                                    </constraints>
+                                    <variation key="default">
+                                        <mask key="constraints">
+                                            <exclude reference="Fkf-og-ytd"/>
+                                            <exclude reference="hu2-xM-w64"/>
+                                            <exclude reference="l9l-jK-cst"/>
+                                            <exclude reference="PjC-cB-YfR"/>
+                                            <exclude reference="qJo-Xg-EhL"/>
+                                            <exclude reference="rpW-dL-KWs"/>
+                                            <exclude reference="sQC-dK-bJs"/>
+                                            <exclude reference="xsM-oo-x8a"/>
+                                        </mask>
+                                    </variation>
+                                    <variation key="heightClass=regular-widthClass=compact">
+                                        <mask key="constraints">
+                                            <include reference="Fkf-og-ytd"/>
+                                            <include reference="hu2-xM-w64"/>
+                                            <include reference="l9l-jK-cst"/>
+                                            <include reference="PjC-cB-YfR"/>
+                                            <include reference="qJo-Xg-EhL"/>
+                                            <include reference="rpW-dL-KWs"/>
+                                            <include reference="sQC-dK-bJs"/>
+                                            <include reference="xsM-oo-x8a"/>
+                                        </mask>
+                                    </variation>
+                                </view>
+                            </subviews>
+                            <animations/>
+                            <constraints>
+                                <constraint firstAttribute="trailing" secondItem="7nf-Ia-7Kq" secondAttribute="trailing" id="QFZ-sI-FTg"/>
+                                <constraint firstItem="Mw5-GF-3oQ" firstAttribute="leading" secondItem="3Np-sH-ysD" secondAttribute="leading" id="RFN-Kf-txX"/>
+                                <constraint firstItem="7nf-Ia-7Kq" firstAttribute="top" secondItem="3Np-sH-ysD" secondAttribute="top" id="SU0-8W-BVB">
+                                    <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                                </constraint>
+                                <constraint firstItem="Mw5-GF-3oQ" firstAttribute="centerY" secondItem="3Np-sH-ysD" secondAttribute="centerY" id="UWf-rC-hV7">
+                                    <variation key="heightClass=regular-widthClass=compact" constant="-3.5"/>
+                                </constraint>
+                                <constraint firstAttribute="trailing" secondItem="bIs-li-8bz" secondAttribute="trailing" id="UaC-ap-Ulp"/>
+                                <constraint firstItem="7nf-Ia-7Kq" firstAttribute="trailing" secondItem="Mw5-GF-3oQ" secondAttribute="trailing" id="fbA-Cy-O1e"/>
+                                <constraint firstItem="Mw5-GF-3oQ" firstAttribute="top" secondItem="7nf-Ia-7Kq" secondAttribute="bottom" constant="1" id="hfD-i1-Fhe">
+                                    <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                                </constraint>
+                                <constraint firstItem="7nf-Ia-7Kq" firstAttribute="leading" secondItem="3Np-sH-ysD" secondAttribute="leading" id="j4G-mB-NeU"/>
+                                <constraint firstAttribute="bottom" secondItem="bIs-li-8bz" secondAttribute="bottom" id="oNC-iJ-Za7"/>
+                                <constraint firstItem="bIs-li-8bz" firstAttribute="leading" secondItem="3Np-sH-ysD" secondAttribute="leading" id="s6c-op-QFh"/>
+                                <constraint firstItem="bIs-li-8bz" firstAttribute="top" secondItem="Mw5-GF-3oQ" secondAttribute="bottom" id="wPf-du-0AV"/>
+                            </constraints>
+                            <variation key="default">
+                                <mask key="subviews">
+                                    <exclude reference="7nf-Ia-7Kq"/>
+                                    <exclude reference="Mw5-GF-3oQ"/>
+                                </mask>
+                                <mask key="constraints">
+                                    <exclude reference="UaC-ap-Ulp"/>
+                                    <exclude reference="oNC-iJ-Za7"/>
+                                    <exclude reference="s6c-op-QFh"/>
+                                    <exclude reference="wPf-du-0AV"/>
+                                    <exclude reference="QFZ-sI-FTg"/>
+                                    <exclude reference="SU0-8W-BVB"/>
+                                    <exclude reference="fbA-Cy-O1e"/>
+                                    <exclude reference="j4G-mB-NeU"/>
+                                    <exclude reference="RFN-Kf-txX"/>
+                                    <exclude reference="UWf-rC-hV7"/>
+                                    <exclude reference="hfD-i1-Fhe"/>
+                                </mask>
+                            </variation>
+                            <variation key="heightClass=regular-widthClass=compact">
+                                <mask key="subviews">
+                                    <include reference="7nf-Ia-7Kq"/>
+                                    <include reference="Mw5-GF-3oQ"/>
+                                </mask>
+                                <mask key="constraints">
+                                    <include reference="UaC-ap-Ulp"/>
+                                    <include reference="oNC-iJ-Za7"/>
+                                    <include reference="s6c-op-QFh"/>
+                                    <include reference="wPf-du-0AV"/>
+                                    <include reference="QFZ-sI-FTg"/>
+                                    <include reference="SU0-8W-BVB"/>
+                                    <include reference="fbA-Cy-O1e"/>
+                                    <include reference="j4G-mB-NeU"/>
+                                    <include reference="RFN-Kf-txX"/>
+                                    <include reference="UWf-rC-hV7"/>
+                                    <include reference="hfD-i1-Fhe"/>
+                                </mask>
+                            </variation>
+                        </view>
+                    </subviews>
+                    <animations/>
+                    <constraints>
+                        <constraint firstAttribute="bottom" secondItem="3Np-sH-ysD" secondAttribute="bottom" constant="1" id="4tu-Yz-TS5">
+                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                        </constraint>
+                        <constraint firstItem="3Np-sH-ysD" firstAttribute="top" secondItem="sqq-aQ-dqD" secondAttribute="top" constant="1" id="CFR-Ui-y7e">
+                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                        </constraint>
+                        <constraint firstAttribute="trailing" secondItem="3Np-sH-ysD" secondAttribute="trailing" constant="66" id="SmO-lm-bHQ">
+                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                        </constraint>
+                        <constraint firstItem="3Np-sH-ysD" firstAttribute="leading" secondItem="sqq-aQ-dqD" secondAttribute="leading" constant="66" id="feN-Ai-BHU">
+                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                        </constraint>
+                    </constraints>
+                    <variation key="default">
+                        <mask key="subviews">
+                            <exclude reference="3Np-sH-ysD"/>
+                        </mask>
+                        <mask key="constraints">
+                            <exclude reference="4tu-Yz-TS5"/>
+                            <exclude reference="CFR-Ui-y7e"/>
+                            <exclude reference="SmO-lm-bHQ"/>
+                            <exclude reference="feN-Ai-BHU"/>
+                        </mask>
+                    </variation>
+                    <variation key="heightClass=regular-widthClass=compact">
+                        <mask key="subviews">
+                            <include reference="3Np-sH-ysD"/>
+                        </mask>
+                        <mask key="constraints">
+                            <include reference="4tu-Yz-TS5"/>
+                            <include reference="CFR-Ui-y7e"/>
+                            <include reference="SmO-lm-bHQ"/>
+                            <include reference="feN-Ai-BHU"/>
+                        </mask>
+                    </variation>
+                </view>
+            </subviews>
+            <animations/>
+            <constraints>
+                <constraint firstAttribute="centerX" secondItem="4c3-gb-BwR" secondAttribute="centerX" id="0tG-Bd-2ic"/>
+                <constraint firstAttribute="trailing" secondItem="4c3-gb-BwR" secondAttribute="trailing" id="F9j-6m-8Sq"/>
+                <constraint firstAttribute="trailing" secondItem="sqq-aQ-dqD" secondAttribute="trailing" constant="15" id="J8W-3c-fXE"/>
+                <constraint firstAttribute="centerY" secondItem="4c3-gb-BwR" secondAttribute="centerY" id="JX5-Sx-hSJ"/>
+                <constraint firstItem="sqq-aQ-dqD" firstAttribute="centerY" secondItem="qLf-va-EAG" secondAttribute="centerY" id="Pfa-lH-sS7"/>
+                <constraint firstItem="4c3-gb-BwR" firstAttribute="top" secondItem="qLf-va-EAG" secondAttribute="top" id="TOG-yL-xSq"/>
+                <constraint firstAttribute="bottom" secondItem="4c3-gb-BwR" secondAttribute="bottom" id="uc7-M6-ZYJ"/>
+                <constraint firstItem="4c3-gb-BwR" firstAttribute="leading" secondItem="qLf-va-EAG" secondAttribute="leading" id="wPB-Gl-TgQ"/>
+                <constraint firstItem="sqq-aQ-dqD" firstAttribute="leading" secondItem="qLf-va-EAG" secondAttribute="leading" constant="15" id="whE-VD-v7i"/>
+            </constraints>
+            <simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
+            <variation key="default">
+                <mask key="subviews">
+                    <exclude reference="4c3-gb-BwR"/>
+                    <exclude reference="sqq-aQ-dqD"/>
+                </mask>
+                <mask key="constraints">
+                    <exclude reference="0tG-Bd-2ic"/>
+                    <exclude reference="F9j-6m-8Sq"/>
+                    <exclude reference="JX5-Sx-hSJ"/>
+                    <exclude reference="TOG-yL-xSq"/>
+                    <exclude reference="uc7-M6-ZYJ"/>
+                    <exclude reference="wPB-Gl-TgQ"/>
+                    <exclude reference="J8W-3c-fXE"/>
+                    <exclude reference="Pfa-lH-sS7"/>
+                    <exclude reference="whE-VD-v7i"/>
+                </mask>
+            </variation>
+            <variation key="heightClass=regular-widthClass=compact">
+                <mask key="subviews">
+                    <include reference="4c3-gb-BwR"/>
+                    <include reference="sqq-aQ-dqD"/>
+                </mask>
+                <mask key="constraints">
+                    <include reference="0tG-Bd-2ic"/>
+                    <include reference="F9j-6m-8Sq"/>
+                    <include reference="JX5-Sx-hSJ"/>
+                    <include reference="TOG-yL-xSq"/>
+                    <include reference="uc7-M6-ZYJ"/>
+                    <include reference="wPB-Gl-TgQ"/>
+                    <include reference="J8W-3c-fXE"/>
+                    <include reference="Pfa-lH-sS7"/>
+                    <include reference="whE-VD-v7i"/>
+                </mask>
+            </variation>
+            <connections>
+                <outlet property="btnCancel" destination="EtP-9O-R3A" id="mr5-zY-bQM"/>
+                <outlet property="btnCold" destination="IuS-hc-CS1" id="Nhd-eq-761"/>
+                <outlet property="btnConfirm" destination="FKG-xS-HlM" id="zTF-29-eYq"/>
+                <outlet property="btnHot" destination="p2W-SQ-1PI" id="JWM-Ln-bgO"/>
+                <outlet property="constraintBtnConfirmWidth" destination="BNE-7a-kbD" id="C9m-XW-2MO"/>
+                <outlet property="containerView" destination="3Np-sH-ysD" id="uJs-dG-r2k"/>
+                <outlet property="lblCity" destination="bQW-Tp-LY8" id="cE6-iw-bFc"/>
+                <outlet property="lblHeat" destination="9dY-hn-QRa" id="TzN-er-Bxr"/>
+                <outlet property="lblTitle" destination="IE2-24-gHl" id="DFB-ut-ky2"/>
+                <outlet property="maskingView" destination="4c3-gb-BwR" id="9bJ-5l-qJq"/>
+                <outlet property="popUpView" destination="sqq-aQ-dqD" id="BCO-MT-Cf2"/>
+                <outletCollection property="chkDays" destination="gEc-zH-hzY" id="xQT-7d-0Gf"/>
+                <outletCollection property="chkDays" destination="zGy-bM-YLk" id="pnV-7Q-T7a"/>
+                <outletCollection property="chkDays" destination="gnm-iP-QY0" id="zoV-OK-ZES"/>
+                <outletCollection property="chkDays" destination="1Oy-jS-Ud8" id="WPx-6q-GCr"/>
+                <outletCollection property="chkDays" destination="o4f-q6-59K" id="sHf-4g-cJR"/>
+                <outletCollection property="chkDays" destination="q2d-7q-uU8" id="KAu-91-2Aw"/>
+                <outletCollection property="chkDays" destination="tEs-LC-Apx" id="b2c-2i-cq1"/>
+            </connections>
+            <point key="canvasLocation" x="218" y="300"/>
+        </view>
+    </objects>
+    <resources>
+        <image name="common_checkbox_default" width="25" height="25"/>
+    </resources>
+</document>

+ 32 - 0
kneet2/Classes/ViewControllers/ThingsScreens/TimePickerPopupView.h

@@ -0,0 +1,32 @@
+//
+//  TimePickerPopupView.h
+//  kneet2
+//
+//  Created by Jason Lee on 11/24/15.
+//  Copyright (c) 2015 ntels. All rights reserved.
+//
+
+@import UIKit;
+#import "CustomAlertView.h"
+#import "JDViewController.h"
+
+@class CustomCheckBox;
+
+@interface CustomDatePicker : UIDatePicker {
+    BOOL changed;
+}
+
+@end
+
+@interface TimePickerPopupView : CustomAlertView
+
+@property (weak, nonatomic) ItemModel *timeTrigger;
+
+//properties
+@property (weak, nonatomic) IBOutlet CustomDatePicker *timePicker;
+@property (strong, nonatomic) IBOutletCollection(CustomCheckBox) NSArray *chkDays;
+
+//methods
+- (id)initFromNib;
+
+@end

+ 231 - 0
kneet2/Classes/ViewControllers/ThingsScreens/TimePickerPopupView.m

@@ -0,0 +1,231 @@
+//
+//  TimePickerPopupView.m
+//  kneet2
+//
+//  Created by Jason Lee on 11/24/15.
+//  Copyright (c) 2015 ntels. All rights reserved.
+//
+#import "JDObject.h"
+
+#import "ItemModel.h"
+
+#import "CustomLabel.h"
+#import "CustomButton.h"
+#import "CustomCheckBox.h"
+#import "CommonUtil.h"
+
+#import "TimePickerPopupView.h"
+
+@implementation CustomDatePicker
+
+- (void)awakeFromNib {
+    self.layer.backgroundColor = [UIColor clearColor].CGColor;
+}
+- (void)addSubview:(UIView *)view {
+    
+    if (!changed) {
+        changed = YES;
+        [self setValue:kUITextColor02 forKey:@"textColor"];
+    }
+    [super addSubview:view];
+}
+
+@end
+
+@interface TimePickerPopupView () {
+    
+}
+
+@end
+
+@implementation TimePickerPopupView
+
+- (id)initFromNib {
+
+    for (UIView *view in [CommonUtil nibViews:@"TimePickerPopupView"]) {
+        if ([view isKindOfClass:[TimePickerPopupView class]]) {
+            self = (TimePickerPopupView *)view;
+
+            ((CustomCheckBox *)_chkDays[0]).value = ksDayOfWeekMON;
+            ((CustomCheckBox *)_chkDays[1]).value = ksDayOfWeekTUE;
+            ((CustomCheckBox *)_chkDays[2]).value = ksDayOfWeekWED;
+            ((CustomCheckBox *)_chkDays[3]).value = ksDayOfWeekTHU;
+            ((CustomCheckBox *)_chkDays[4]).value = ksDayOfWeekFRI;
+            ((CustomCheckBox *)_chkDays[5]).value = ksDayOfWeekSAT;
+            ((CustomCheckBox *)_chkDays[6]).value = ksDayOfWeekSUN;
+            
+            
+            for (CustomCheckBox *chk in _chkDays) {
+                [self alignTextAndImageOfButton:chk];
+            }
+            
+            
+            //Localization
+            [self.btnConfirm setTitle:NSLocalizedString(@"확인", @"확인") forState:UIControlStateNormal];
+            [self.btnCancel setTitle:NSLocalizedString(@"취소", @"취소") forState:UIControlStateNormal];
+        }
+    }
+
+    return self;
+}
+
+- (void)alignTextAndImageOfButton:(UIButton *)button {
+    // the space between the image and text
+    CGFloat spacing = 6.0;
+    float textMargin = 0;
+    
+    // get the size of the elements here for readability
+    CGSize  imageSize   = button.imageView.image.size;
+    CGSize  titleSize   = button.titleLabel.frame.size;
+    CGFloat totalHeight = (imageSize.height + titleSize.height + spacing);      // get the height they will take up as a unit
+    
+    // lower the text and push it left to center it
+    button.titleEdgeInsets = UIEdgeInsetsMake( 0.0, -imageSize.width +textMargin, - (totalHeight - titleSize.height), +textMargin );   // top, left, bottom, right
+    
+    // the text width might have changed (in case it was shortened before due to
+    // lack of space and isn't anymore now), so we get the frame size again
+    titleSize = button.titleLabel.bounds.size;
+    
+    button.imageEdgeInsets = UIEdgeInsetsMake(25, 0.0, 0.0, -titleSize.width );     // top, left, bottom, right
+}
+
+
+- (void)setTimeTrigger:(ItemModel *)timeTrigger {
+    _timeTrigger = timeTrigger;
+    
+    if (_timeTrigger.itemSubTypeCode && [_timeTrigger.itemSubTypeCode isEqualToString:ksItemSubTypeCodeTimer]) {//기존 데이터가 있을 경우,
+        ItemSubModel *subItem = _timeTrigger.timers[0];
+        
+        NSDateComponents *ds = [CommonUtil dateComponents:[NSDate date] timezone:[NSTimeZone systemTimeZone]];
+        ds.hour = [subItem.hour integerValue];
+        ds.minute = [subItem.minute integerValue];
+        _timePicker.date = [[NSCalendar currentCalendar] dateFromComponents:ds];
+
+    } else {//is new
+        
+        _timeTrigger.itemName = @"이 시간마다";
+        _timeTrigger.itemSubTypeCode = ksItemSubTypeCodeTimer;
+        
+        NSDateComponents *ds = [CommonUtil dateComponents:[NSDate date] timezone:[NSTimeZone systemTimeZone]];
+        ds.hour = 9;
+        ds.minute = 0;
+        _timePicker.date = [[NSCalendar currentCalendar] dateFromComponents:ds];
+        
+        for (CustomCheckBox *chk in _chkDays) {
+            chk.checked = YES;
+        }
+    }
+}
+
+
+- (void)didMoveToSuperview {
+    
+}
+
+#pragma mark - Main Logic
+
+- (NSString *)stringOfDay:(NSInteger)index {
+    NSString *day = nil;
+    switch (index) {
+        case 0:
+            day = NSLocalizedString(@"월", @"월");
+            break;
+        case 1:
+            day = NSLocalizedString(@"화", @"화");
+            break;
+        case 2:
+            day = NSLocalizedString(@"수", @"수");
+            break;
+        case 3:
+            day = NSLocalizedString(@"목", @"목");
+            break;
+        case 4:
+            day = NSLocalizedString(@"금", @"금");
+            break;
+        case 5:
+            day = NSLocalizedString(@"토", @"토");
+            break;
+        case 6:
+            day = NSLocalizedString(@"일", @"일");
+            break;
+    }
+    return day;
+}
+
+- (NSString *)daysOfWeek {
+    //dayOfWeek
+    NSMutableString *days = [[NSMutableString alloc] init];
+    
+    NSInteger i = 0;
+    for (CustomCheckBox *chk in _chkDays) {
+        if (chk.checked) {
+            NSString *prefix = [days isEmptyString] ? ksEmptyString : @", ";
+            [days appendFormat:@"%@%@", prefix, [self stringOfDay:i]];
+        }
+        i++;
+    }
+    return days;
+}
+
+- (NSString *)cmdClsValue {
+    NSMutableString *days = [[NSMutableString alloc] init];
+    
+    for (CustomCheckBox *chk in _chkDays) {
+        if (chk.checked) {
+            NSString *prefix = [days isEmptyString] ? ksEmptyString : @",";
+            [days appendFormat:@"%@%@", prefix, chk.value];
+        }
+    }
+    return days;
+}
+
+#pragma mark - UI Events
+
+- (BOOL)validateCondition {
+    
+    //1.validate
+    NSInteger count = 0;
+    for (CustomCheckBox *chk in _chkDays) {
+        if (chk.checked) {
+            count++;
+        }
+    }
+    
+    //1. validate
+    if (count == 0) {
+        [[JDFacade facade] alert:NSLocalizedString(@"요일을 선택해주세요", @"요일을 선택해주세요")];
+    }
+    return count;
+}
+
+- (IBAction)btnConfirmTouched:(id)sender {
+    //validate
+    if (![self validateCondition]) {
+        return;
+    }
+
+    ItemSubModel *subItem = nil;
+    if (_timeTrigger.subItems && _timeTrigger.subItems.count) {
+        subItem = _timeTrigger.subItems[0];
+    } else {
+        subItem = [[ItemSubModel alloc] init];
+        
+        _timeTrigger.timers = (NSMutableArray<ItemSubModel> *)[[NSMutableArray alloc] init];
+        [_timeTrigger.timers addObject:subItem];
+    }
+
+
+    //time
+    NSDateComponents *ds = [CommonUtil dateComponents:_timePicker.date timezone:[NSTimeZone systemTimeZone]];
+    
+    subItem.hour = [NSString stringWithFormat:@"%zd", ds.hour];
+    subItem.minute = [NSString stringWithFormat:@"%zd", ds.minute];
+    subItem.cmdclsValue = [self cmdClsValue];
+    subItem.daysOfWeek = [self daysOfWeek];
+    
+    [super btnConfirmTouched:sender];
+}
+
+
+
+@end

+ 752 - 0
kneet2/Classes/ViewControllers/ThingsScreens/TimePickerPopupView.xib

@@ -0,0 +1,752 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9060" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="qLf-va-EAG" customClass="TimePickerPopupView">
+            <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <view alpha="0.29999999999999999" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4c3-gb-BwR" userLabel="maskView">
+                    <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                    <animations/>
+                    <color key="backgroundColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
+                </view>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="sqq-aQ-dqD" userLabel="popUpView">
+                    <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                    <subviews>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="3Np-sH-ysD" userLabel="ContainerView">
+                            <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                            <subviews>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="7nf-Ia-7Kq" userLabel="View - Title">
+                                    <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                                    <subviews>
+                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="이 시간이 되면" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="IE2-24-gHl" customClass="CustomLabel">
+                                            <rect key="frame" x="0.0" y="-21" width="42" height="21"/>
+                                            <animations/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="64" id="gmY-Rb-Qao"/>
+                                            </constraints>
+                                            <fontDescription key="fontDescription" type="boldSystem" pointSize="18"/>
+                                            <color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                            <nil key="highlightedColor"/>
+                                            <variation key="default">
+                                                <mask key="constraints">
+                                                    <exclude reference="gmY-Rb-Qao"/>
+                                                </mask>
+                                            </variation>
+                                            <variation key="heightClass=regular-widthClass=compact">
+                                                <mask key="constraints">
+                                                    <include reference="gmY-Rb-Qao"/>
+                                                </mask>
+                                            </variation>
+                                        </label>
+                                    </subviews>
+                                    <animations/>
+                                    <color key="backgroundColor" red="0.95686274510000002" green="0.30588235289999999" blue="0.3294117647" alpha="1" colorSpace="calibratedRGB"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="44" id="1fj-XN-uH0">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="64"/>
+                                        </constraint>
+                                        <constraint firstItem="IE2-24-gHl" firstAttribute="leading" secondItem="7nf-Ia-7Kq" secondAttribute="leading" id="98Q-bq-Oq7">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="20"/>
+                                        </constraint>
+                                        <constraint firstItem="IE2-24-gHl" firstAttribute="top" secondItem="7nf-Ia-7Kq" secondAttribute="top" id="Ldj-nV-yrM">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                                        </constraint>
+                                        <constraint firstAttribute="trailing" secondItem="IE2-24-gHl" secondAttribute="trailing" id="mUY-4l-GjT">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="-8"/>
+                                        </constraint>
+                                        <constraint firstAttribute="bottom" secondItem="IE2-24-gHl" secondAttribute="bottom" id="yzV-EQ-HeM">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                                        </constraint>
+                                    </constraints>
+                                    <variation key="default">
+                                        <mask key="subviews">
+                                            <exclude reference="IE2-24-gHl"/>
+                                        </mask>
+                                        <mask key="constraints">
+                                            <exclude reference="1fj-XN-uH0"/>
+                                            <exclude reference="98Q-bq-Oq7"/>
+                                            <exclude reference="Ldj-nV-yrM"/>
+                                            <exclude reference="mUY-4l-GjT"/>
+                                            <exclude reference="yzV-EQ-HeM"/>
+                                        </mask>
+                                    </variation>
+                                    <variation key="heightClass=regular-widthClass=compact">
+                                        <mask key="subviews">
+                                            <include reference="IE2-24-gHl"/>
+                                        </mask>
+                                        <mask key="constraints">
+                                            <exclude reference="1fj-XN-uH0"/>
+                                            <include reference="98Q-bq-Oq7"/>
+                                            <include reference="Ldj-nV-yrM"/>
+                                            <include reference="mUY-4l-GjT"/>
+                                            <include reference="yzV-EQ-HeM"/>
+                                        </mask>
+                                    </variation>
+                                </view>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Mw5-GF-3oQ" userLabel="View - message">
+                                    <rect key="frame" x="0.0" y="0.0" width="320" height="568"/>
+                                    <subviews>
+                                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ZLi-Se-du7" userLabel="View - days">
+                                            <rect key="frame" x="0.0" y="0.0" width="240" height="128"/>
+                                            <subviews>
+                                                <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="zGy-bM-YLk" customClass="CustomCheckBox">
+                                                    <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                    <animations/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="36" id="BJY-KH-1tY">
+                                                            <variation key="heightClass=regular-widthClass=compact" constant="40"/>
+                                                        </constraint>
+                                                        <constraint firstAttribute="height" constant="50" id="k2r-na-9Bg"/>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
+                                                    <inset key="titleEdgeInsets" minX="-26" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                                    <inset key="imageEdgeInsets" minX="6" minY="25" maxX="0.0" maxY="0.0"/>
+                                                    <state key="normal" title="SUN" image="common_checkbox_default">
+                                                        <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                                    </state>
+                                                    <state key="highlighted">
+                                                        <color key="titleColor" red="0.96470588239999999" green="0.27058823529999998" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
+                                                    </state>
+                                                    <variation key="default">
+                                                        <mask key="constraints">
+                                                            <exclude reference="BJY-KH-1tY"/>
+                                                            <exclude reference="k2r-na-9Bg"/>
+                                                        </mask>
+                                                    </variation>
+                                                    <variation key="heightClass=regular-widthClass=compact">
+                                                        <mask key="constraints">
+                                                            <include reference="BJY-KH-1tY"/>
+                                                            <include reference="k2r-na-9Bg"/>
+                                                        </mask>
+                                                    </variation>
+                                                </button>
+                                                <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="1Oy-jS-Ud8" customClass="CustomCheckBox">
+                                                    <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                    <animations/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="50" id="PJV-EI-OpY"/>
+                                                        <constraint firstAttribute="width" constant="36" id="WBc-Ic-YW2">
+                                                            <variation key="heightClass=regular-widthClass=compact" constant="40"/>
+                                                        </constraint>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
+                                                    <inset key="titleEdgeInsets" minX="-26" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                                    <inset key="imageEdgeInsets" minX="8" minY="25" maxX="0.0" maxY="0.0"/>
+                                                    <state key="normal" title="MON" image="common_checkbox_default">
+                                                        <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                                    </state>
+                                                    <state key="highlighted">
+                                                        <color key="titleColor" red="0.96470588239999999" green="0.27058823529999998" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
+                                                    </state>
+                                                    <variation key="default">
+                                                        <mask key="constraints">
+                                                            <exclude reference="PJV-EI-OpY"/>
+                                                            <exclude reference="WBc-Ic-YW2"/>
+                                                        </mask>
+                                                    </variation>
+                                                    <variation key="heightClass=regular-widthClass=compact">
+                                                        <mask key="constraints">
+                                                            <include reference="PJV-EI-OpY"/>
+                                                            <include reference="WBc-Ic-YW2"/>
+                                                        </mask>
+                                                    </variation>
+                                                </button>
+                                                <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="tEs-LC-Apx" customClass="CustomCheckBox">
+                                                    <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                    <animations/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="36" id="Org-up-Glu">
+                                                            <variation key="heightClass=regular-widthClass=compact" constant="40"/>
+                                                        </constraint>
+                                                        <constraint firstAttribute="height" constant="50" id="bSk-1m-ZS2"/>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
+                                                    <inset key="titleEdgeInsets" minX="-26" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                                    <inset key="imageEdgeInsets" minX="6" minY="25" maxX="0.0" maxY="0.0"/>
+                                                    <state key="normal" title="TUE" image="common_checkbox_default">
+                                                        <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                                    </state>
+                                                    <state key="highlighted">
+                                                        <color key="titleColor" red="0.96470588239999999" green="0.27058823529999998" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
+                                                    </state>
+                                                    <variation key="default">
+                                                        <mask key="constraints">
+                                                            <exclude reference="bSk-1m-ZS2"/>
+                                                            <exclude reference="Org-up-Glu"/>
+                                                        </mask>
+                                                    </variation>
+                                                    <variation key="heightClass=regular-widthClass=compact">
+                                                        <mask key="constraints">
+                                                            <include reference="bSk-1m-ZS2"/>
+                                                            <include reference="Org-up-Glu"/>
+                                                        </mask>
+                                                    </variation>
+                                                </button>
+                                                <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="q2d-7q-uU8" customClass="CustomCheckBox">
+                                                    <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                    <animations/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="50" id="2ch-WH-dIs"/>
+                                                        <constraint firstAttribute="width" constant="36" id="9Ph-Xu-0TP">
+                                                            <variation key="heightClass=regular-widthClass=compact" constant="40"/>
+                                                        </constraint>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
+                                                    <inset key="titleEdgeInsets" minX="-26" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                                    <inset key="imageEdgeInsets" minX="6" minY="25" maxX="0.0" maxY="0.0"/>
+                                                    <state key="normal" title="WED" image="common_checkbox_default">
+                                                        <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                                    </state>
+                                                    <state key="highlighted">
+                                                        <color key="titleColor" red="0.96470588239999999" green="0.27058823529999998" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
+                                                    </state>
+                                                    <variation key="default">
+                                                        <mask key="constraints">
+                                                            <exclude reference="9Ph-Xu-0TP"/>
+                                                            <exclude reference="2ch-WH-dIs"/>
+                                                        </mask>
+                                                    </variation>
+                                                    <variation key="heightClass=regular-widthClass=compact">
+                                                        <mask key="constraints">
+                                                            <include reference="9Ph-Xu-0TP"/>
+                                                            <include reference="2ch-WH-dIs"/>
+                                                        </mask>
+                                                    </variation>
+                                                </button>
+                                                <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gnm-iP-QY0" customClass="CustomCheckBox">
+                                                    <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                    <animations/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="width" constant="36" id="Vlv-Ms-WHn">
+                                                            <variation key="heightClass=regular-widthClass=compact" constant="40"/>
+                                                        </constraint>
+                                                        <constraint firstAttribute="height" constant="50" id="tau-FB-ZEc"/>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
+                                                    <inset key="titleEdgeInsets" minX="-26" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                                    <inset key="imageEdgeInsets" minX="6" minY="25" maxX="0.0" maxY="0.0"/>
+                                                    <state key="normal" title="THU" image="common_checkbox_default">
+                                                        <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                                    </state>
+                                                    <state key="highlighted">
+                                                        <color key="titleColor" red="0.96470588239999999" green="0.27058823529999998" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
+                                                    </state>
+                                                    <variation key="default">
+                                                        <mask key="constraints">
+                                                            <exclude reference="Vlv-Ms-WHn"/>
+                                                            <exclude reference="tau-FB-ZEc"/>
+                                                        </mask>
+                                                    </variation>
+                                                    <variation key="heightClass=regular-widthClass=compact">
+                                                        <mask key="constraints">
+                                                            <include reference="Vlv-Ms-WHn"/>
+                                                            <include reference="tau-FB-ZEc"/>
+                                                        </mask>
+                                                    </variation>
+                                                </button>
+                                                <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="gEc-zH-hzY" customClass="CustomCheckBox">
+                                                    <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                    <animations/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="50" id="Stm-DZ-sIz"/>
+                                                        <constraint firstAttribute="width" constant="36" id="Zq5-Sg-gCK">
+                                                            <variation key="heightClass=regular-widthClass=compact" constant="40"/>
+                                                        </constraint>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
+                                                    <inset key="titleEdgeInsets" minX="-26" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                                    <inset key="imageEdgeInsets" minX="6" minY="25" maxX="0.0" maxY="0.0"/>
+                                                    <state key="normal" title="FRI" image="common_checkbox_default">
+                                                        <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                                    </state>
+                                                    <state key="highlighted">
+                                                        <color key="titleColor" red="0.96470588239999999" green="0.27058823529999998" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
+                                                    </state>
+                                                    <variation key="default">
+                                                        <mask key="constraints">
+                                                            <exclude reference="Zq5-Sg-gCK"/>
+                                                            <exclude reference="Stm-DZ-sIz"/>
+                                                        </mask>
+                                                    </variation>
+                                                    <variation key="heightClass=regular-widthClass=compact">
+                                                        <mask key="constraints">
+                                                            <include reference="Zq5-Sg-gCK"/>
+                                                            <include reference="Stm-DZ-sIz"/>
+                                                        </mask>
+                                                    </variation>
+                                                </button>
+                                                <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="40" placeholderIntrinsicHeight="50" contentHorizontalAlignment="center" contentVerticalAlignment="top" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="o4f-q6-59K" customClass="CustomCheckBox">
+                                                    <rect key="frame" x="-23" y="-15" width="46" height="30"/>
+                                                    <animations/>
+                                                    <constraints>
+                                                        <constraint firstAttribute="height" constant="50" id="XPv-d7-MIX"/>
+                                                        <constraint firstAttribute="width" constant="36" id="nYI-Nu-P6l">
+                                                            <variation key="heightClass=regular-widthClass=compact" constant="40"/>
+                                                        </constraint>
+                                                    </constraints>
+                                                    <fontDescription key="fontDescription" type="boldSystem" pointSize="12"/>
+                                                    <inset key="titleEdgeInsets" minX="-26" minY="0.0" maxX="0.0" maxY="0.0"/>
+                                                    <inset key="imageEdgeInsets" minX="6" minY="25" maxX="0.0" maxY="0.0"/>
+                                                    <state key="normal" title="SAT" image="common_checkbox_default">
+                                                        <color key="titleColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                                        <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                                    </state>
+                                                    <state key="highlighted">
+                                                        <color key="titleColor" red="0.96470588239999999" green="0.27058823529999998" blue="0.30196078430000001" alpha="1" colorSpace="calibratedRGB"/>
+                                                    </state>
+                                                    <variation key="default">
+                                                        <mask key="constraints">
+                                                            <exclude reference="XPv-d7-MIX"/>
+                                                            <exclude reference="nYI-Nu-P6l"/>
+                                                        </mask>
+                                                    </variation>
+                                                    <variation key="heightClass=regular-widthClass=compact">
+                                                        <mask key="constraints">
+                                                            <include reference="XPv-d7-MIX"/>
+                                                            <include reference="nYI-Nu-P6l"/>
+                                                        </mask>
+                                                    </variation>
+                                                </button>
+                                            </subviews>
+                                            <animations/>
+                                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                            <constraints>
+                                                <constraint firstItem="tEs-LC-Apx" firstAttribute="leading" secondItem="1Oy-jS-Ud8" secondAttribute="trailing" id="2QB-ji-wZE"/>
+                                                <constraint firstItem="tEs-LC-Apx" firstAttribute="centerY" secondItem="1Oy-jS-Ud8" secondAttribute="centerY" id="Fft-qq-bZn"/>
+                                                <constraint firstAttribute="height" constant="50" id="FtA-7U-SSB"/>
+                                                <constraint firstItem="1Oy-jS-Ud8" firstAttribute="leading" secondItem="ZLi-Se-du7" secondAttribute="leading" constant="5" id="GpP-m8-6VH">
+                                                    <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                                                </constraint>
+                                                <constraint firstItem="tEs-LC-Apx" firstAttribute="centerY" secondItem="q2d-7q-uU8" secondAttribute="centerY" id="NcT-o2-E4s"/>
+                                                <constraint firstItem="zGy-bM-YLk" firstAttribute="leading" secondItem="o4f-q6-59K" secondAttribute="trailing" id="NlM-oU-U4q"/>
+                                                <constraint firstItem="1Oy-jS-Ud8" firstAttribute="top" secondItem="ZLi-Se-du7" secondAttribute="top" id="PUa-PM-zqn"/>
+                                                <constraint firstItem="gEc-zH-hzY" firstAttribute="centerY" secondItem="o4f-q6-59K" secondAttribute="centerY" id="RSf-w4-s9j"/>
+                                                <constraint firstItem="gnm-iP-QY0" firstAttribute="leading" secondItem="q2d-7q-uU8" secondAttribute="trailing" id="SKq-i7-LoV"/>
+                                                <constraint firstItem="q2d-7q-uU8" firstAttribute="centerY" secondItem="gnm-iP-QY0" secondAttribute="centerY" id="aMH-w7-y8I"/>
+                                                <constraint firstItem="zGy-bM-YLk" firstAttribute="centerY" secondItem="o4f-q6-59K" secondAttribute="centerY" id="g06-pK-BuC"/>
+                                                <constraint firstItem="q2d-7q-uU8" firstAttribute="leading" secondItem="tEs-LC-Apx" secondAttribute="trailing" id="grt-Ny-anD"/>
+                                                <constraint firstItem="gEc-zH-hzY" firstAttribute="leading" secondItem="gnm-iP-QY0" secondAttribute="trailing" id="hRL-CP-iPT"/>
+                                                <constraint firstItem="gnm-iP-QY0" firstAttribute="centerY" secondItem="gEc-zH-hzY" secondAttribute="centerY" id="sNq-bS-KDt"/>
+                                                <constraint firstItem="o4f-q6-59K" firstAttribute="leading" secondItem="gEc-zH-hzY" secondAttribute="trailing" id="u62-rv-3Ha"/>
+                                            </constraints>
+                                            <variation key="default">
+                                                <mask key="subviews">
+                                                    <exclude reference="zGy-bM-YLk"/>
+                                                    <exclude reference="1Oy-jS-Ud8"/>
+                                                    <exclude reference="tEs-LC-Apx"/>
+                                                    <exclude reference="q2d-7q-uU8"/>
+                                                    <exclude reference="gnm-iP-QY0"/>
+                                                    <exclude reference="gEc-zH-hzY"/>
+                                                    <exclude reference="o4f-q6-59K"/>
+                                                </mask>
+                                                <mask key="constraints">
+                                                    <exclude reference="FtA-7U-SSB"/>
+                                                    <exclude reference="GpP-m8-6VH"/>
+                                                    <exclude reference="PUa-PM-zqn"/>
+                                                    <exclude reference="2QB-ji-wZE"/>
+                                                    <exclude reference="Fft-qq-bZn"/>
+                                                    <exclude reference="NcT-o2-E4s"/>
+                                                    <exclude reference="aMH-w7-y8I"/>
+                                                    <exclude reference="grt-Ny-anD"/>
+                                                    <exclude reference="SKq-i7-LoV"/>
+                                                    <exclude reference="sNq-bS-KDt"/>
+                                                    <exclude reference="RSf-w4-s9j"/>
+                                                    <exclude reference="hRL-CP-iPT"/>
+                                                    <exclude reference="u62-rv-3Ha"/>
+                                                    <exclude reference="NlM-oU-U4q"/>
+                                                    <exclude reference="g06-pK-BuC"/>
+                                                </mask>
+                                            </variation>
+                                            <variation key="heightClass=regular-widthClass=compact">
+                                                <mask key="subviews">
+                                                    <include reference="zGy-bM-YLk"/>
+                                                    <include reference="1Oy-jS-Ud8"/>
+                                                    <include reference="tEs-LC-Apx"/>
+                                                    <include reference="q2d-7q-uU8"/>
+                                                    <include reference="gnm-iP-QY0"/>
+                                                    <include reference="gEc-zH-hzY"/>
+                                                    <include reference="o4f-q6-59K"/>
+                                                </mask>
+                                                <mask key="constraints">
+                                                    <include reference="FtA-7U-SSB"/>
+                                                    <include reference="GpP-m8-6VH"/>
+                                                    <include reference="PUa-PM-zqn"/>
+                                                    <include reference="2QB-ji-wZE"/>
+                                                    <include reference="Fft-qq-bZn"/>
+                                                    <include reference="NcT-o2-E4s"/>
+                                                    <include reference="aMH-w7-y8I"/>
+                                                    <include reference="grt-Ny-anD"/>
+                                                    <include reference="SKq-i7-LoV"/>
+                                                    <include reference="sNq-bS-KDt"/>
+                                                    <include reference="RSf-w4-s9j"/>
+                                                    <include reference="hRL-CP-iPT"/>
+                                                    <include reference="u62-rv-3Ha"/>
+                                                    <include reference="NlM-oU-U4q"/>
+                                                    <include reference="g06-pK-BuC"/>
+                                                </mask>
+                                            </variation>
+                                        </view>
+                                        <datePicker contentMode="scaleToFill" placeholderIntrinsicWidth="280" placeholderIntrinsicHeight="165" contentHorizontalAlignment="center" contentVerticalAlignment="center" datePickerMode="time" minuteInterval="1" translatesAutoresizingMaskIntoConstraints="NO" id="wQG-aC-zDU" customClass="CustomDatePicker">
+                                            <rect key="frame" x="-160" y="-81" width="320" height="162"/>
+                                            <animations/>
+                                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" relation="greaterThanOrEqual" constant="165" id="J6y-k3-t3O"/>
+                                                <constraint firstAttribute="height" constant="180" id="YPr-Kq-265">
+                                                    <variation key="heightClass=regular-widthClass=compact" constant="165"/>
+                                                </constraint>
+                                                <constraint firstAttribute="width" constant="215" id="fqG-ev-09e">
+                                                    <variation key="heightClass=regular-widthClass=compact" constant="280"/>
+                                                </constraint>
+                                            </constraints>
+                                            <date key="date" timeIntervalSinceReferenceDate="448876514.24502999">
+                                                <!--2015-03-24 07:55:14 +0000-->
+                                            </date>
+                                            <variation key="default">
+                                                <mask key="constraints">
+                                                    <exclude reference="J6y-k3-t3O"/>
+                                                    <exclude reference="YPr-Kq-265"/>
+                                                    <exclude reference="fqG-ev-09e"/>
+                                                </mask>
+                                            </variation>
+                                            <variation key="heightClass=regular-widthClass=compact">
+                                                <mask key="constraints">
+                                                    <exclude reference="J6y-k3-t3O"/>
+                                                    <include reference="YPr-Kq-265"/>
+                                                    <exclude reference="fqG-ev-09e"/>
+                                                </mask>
+                                            </variation>
+                                        </datePicker>
+                                    </subviews>
+                                    <animations/>
+                                    <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                    <constraints>
+                                        <constraint firstItem="wQG-aC-zDU" firstAttribute="leading" secondItem="Mw5-GF-3oQ" secondAttribute="leading" constant="25" id="1wC-sv-L9S"/>
+                                        <constraint firstItem="wQG-aC-zDU" firstAttribute="top" secondItem="Mw5-GF-3oQ" secondAttribute="top" constant="30" id="23w-ub-yQ0"/>
+                                        <constraint firstAttribute="bottom" secondItem="ZLi-Se-du7" secondAttribute="bottom" constant="25" id="8Yh-yb-IuI"/>
+                                        <constraint firstItem="ZLi-Se-du7" firstAttribute="leading" secondItem="Mw5-GF-3oQ" secondAttribute="leading" id="Jeq-dm-hZR">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="10"/>
+                                        </constraint>
+                                        <constraint firstItem="ZLi-Se-du7" firstAttribute="top" secondItem="wQG-aC-zDU" secondAttribute="bottom" constant="28" id="j0X-Cb-gMn">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="30"/>
+                                        </constraint>
+                                        <constraint firstAttribute="trailing" secondItem="wQG-aC-zDU" secondAttribute="trailing" constant="25" id="pZ6-Yu-lI1"/>
+                                        <constraint firstAttribute="trailing" secondItem="ZLi-Se-du7" secondAttribute="trailing" id="qou-uS-gii">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                                        </constraint>
+                                    </constraints>
+                                    <variation key="default">
+                                        <mask key="subviews">
+                                            <exclude reference="ZLi-Se-du7"/>
+                                            <exclude reference="wQG-aC-zDU"/>
+                                        </mask>
+                                        <mask key="constraints">
+                                            <exclude reference="1wC-sv-L9S"/>
+                                            <exclude reference="23w-ub-yQ0"/>
+                                            <exclude reference="pZ6-Yu-lI1"/>
+                                            <exclude reference="8Yh-yb-IuI"/>
+                                            <exclude reference="Jeq-dm-hZR"/>
+                                            <exclude reference="j0X-Cb-gMn"/>
+                                            <exclude reference="qou-uS-gii"/>
+                                        </mask>
+                                    </variation>
+                                    <variation key="heightClass=regular-widthClass=compact">
+                                        <mask key="subviews">
+                                            <include reference="ZLi-Se-du7"/>
+                                            <include reference="wQG-aC-zDU"/>
+                                        </mask>
+                                        <mask key="constraints">
+                                            <include reference="1wC-sv-L9S"/>
+                                            <include reference="23w-ub-yQ0"/>
+                                            <include reference="pZ6-Yu-lI1"/>
+                                            <include reference="8Yh-yb-IuI"/>
+                                            <include reference="Jeq-dm-hZR"/>
+                                            <include reference="j0X-Cb-gMn"/>
+                                            <include reference="qou-uS-gii"/>
+                                        </mask>
+                                    </variation>
+                                </view>
+                                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bIs-li-8bz" userLabel="View - Buttons">
+                                    <rect key="frame" x="-20" y="156" width="338" height="90"/>
+                                    <subviews>
+                                        <button opaque="NO" contentMode="scaleToFill" placeholderIntrinsicWidth="145" placeholderIntrinsicHeight="70" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="FKG-xS-HlM" customClass="CustomButton">
+                                            <rect key="frame" x="20" y="20" width="149" height="50"/>
+                                            <animations/>
+                                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                            <constraints>
+                                                <constraint firstAttribute="width" relation="greaterThanOrEqual" id="BNE-7a-kbD"/>
+                                            </constraints>
+                                            <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                                            <state key="normal" title="확인">
+                                                <color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
+                                                <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                            </state>
+                                            <state key="highlighted">
+                                                <color key="titleColor" red="0.73601246840000001" green="0.3682315451" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
+                                            </state>
+                                            <variation key="default">
+                                                <mask key="constraints">
+                                                    <exclude reference="BNE-7a-kbD"/>
+                                                </mask>
+                                            </variation>
+                                            <variation key="heightClass=regular-widthClass=compact">
+                                                <mask key="constraints">
+                                                    <include reference="BNE-7a-kbD"/>
+                                                </mask>
+                                            </variation>
+                                            <connections>
+                                                <action selector="btnConfirmTouched:" destination="qLf-va-EAG" eventType="touchUpInside" id="JvU-lL-1vP"/>
+                                            </connections>
+                                        </button>
+                                        <button opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="249" horizontalCompressionResistancePriority="749" placeholderIntrinsicWidth="144" placeholderIntrinsicHeight="70" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="EtP-9O-R3A" customClass="CustomButton">
+                                            <rect key="frame" x="170" y="20" width="148" height="50"/>
+                                            <animations/>
+                                            <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
+                                            <constraints>
+                                                <constraint firstAttribute="height" constant="44" id="L9v-r3-6MJ">
+                                                    <variation key="heightClass=regular-widthClass=compact" constant="50"/>
+                                                </constraint>
+                                            </constraints>
+                                            <fontDescription key="fontDescription" type="boldSystem" pointSize="15"/>
+                                            <state key="normal" title="취소">
+                                                <color key="titleColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
+                                                <color key="titleShadowColor" white="0.5" alpha="1" colorSpace="calibratedWhite"/>
+                                            </state>
+                                            <variation key="default">
+                                                <mask key="constraints">
+                                                    <exclude reference="L9v-r3-6MJ"/>
+                                                </mask>
+                                            </variation>
+                                            <variation key="heightClass=regular-widthClass=compact">
+                                                <mask key="constraints">
+                                                    <exclude reference="L9v-r3-6MJ"/>
+                                                </mask>
+                                            </variation>
+                                            <connections>
+                                                <action selector="btnCancelTouched:" destination="qLf-va-EAG" eventType="touchUpInside" id="g5k-Tn-E33"/>
+                                            </connections>
+                                        </button>
+                                    </subviews>
+                                    <animations/>
+                                    <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="calibratedWhite"/>
+                                    <constraints>
+                                        <constraint firstItem="FKG-xS-HlM" firstAttribute="leading" secondItem="bIs-li-8bz" secondAttribute="leading" id="Fkf-og-ytd"/>
+                                        <constraint firstAttribute="trailing" secondItem="EtP-9O-R3A" secondAttribute="trailing" id="PjC-cB-YfR"/>
+                                        <constraint firstItem="FKG-xS-HlM" firstAttribute="top" secondItem="bIs-li-8bz" secondAttribute="top" constant="1" id="hu2-xM-w64"/>
+                                        <constraint firstAttribute="bottom" secondItem="FKG-xS-HlM" secondAttribute="bottom" id="l9l-jK-cst"/>
+                                        <constraint firstItem="EtP-9O-R3A" firstAttribute="width" secondItem="FKG-xS-HlM" secondAttribute="width" id="qJo-Xg-EhL">
+                                            <variation key="heightClass=regular-widthClass=compact" constant="-1"/>
+                                        </constraint>
+                                        <constraint firstItem="EtP-9O-R3A" firstAttribute="leading" secondItem="FKG-xS-HlM" secondAttribute="trailing" constant="1" id="rpW-dL-KWs"/>
+                                        <constraint firstAttribute="bottom" secondItem="EtP-9O-R3A" secondAttribute="bottom" id="sQC-dK-bJs"/>
+                                        <constraint firstItem="EtP-9O-R3A" firstAttribute="top" secondItem="bIs-li-8bz" secondAttribute="top" constant="1" id="xsM-oo-x8a"/>
+                                    </constraints>
+                                    <variation key="default">
+                                        <mask key="constraints">
+                                            <exclude reference="Fkf-og-ytd"/>
+                                            <exclude reference="hu2-xM-w64"/>
+                                            <exclude reference="l9l-jK-cst"/>
+                                            <exclude reference="PjC-cB-YfR"/>
+                                            <exclude reference="qJo-Xg-EhL"/>
+                                            <exclude reference="rpW-dL-KWs"/>
+                                            <exclude reference="sQC-dK-bJs"/>
+                                            <exclude reference="xsM-oo-x8a"/>
+                                        </mask>
+                                    </variation>
+                                    <variation key="heightClass=regular-widthClass=compact">
+                                        <mask key="constraints">
+                                            <include reference="Fkf-og-ytd"/>
+                                            <include reference="hu2-xM-w64"/>
+                                            <include reference="l9l-jK-cst"/>
+                                            <include reference="PjC-cB-YfR"/>
+                                            <include reference="qJo-Xg-EhL"/>
+                                            <include reference="rpW-dL-KWs"/>
+                                            <include reference="sQC-dK-bJs"/>
+                                            <include reference="xsM-oo-x8a"/>
+                                        </mask>
+                                    </variation>
+                                </view>
+                            </subviews>
+                            <animations/>
+                            <constraints>
+                                <constraint firstAttribute="trailing" secondItem="7nf-Ia-7Kq" secondAttribute="trailing" id="QFZ-sI-FTg"/>
+                                <constraint firstItem="Mw5-GF-3oQ" firstAttribute="leading" secondItem="3Np-sH-ysD" secondAttribute="leading" id="RFN-Kf-txX"/>
+                                <constraint firstItem="7nf-Ia-7Kq" firstAttribute="top" secondItem="3Np-sH-ysD" secondAttribute="top" id="SU0-8W-BVB">
+                                    <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                                </constraint>
+                                <constraint firstItem="Mw5-GF-3oQ" firstAttribute="centerY" secondItem="3Np-sH-ysD" secondAttribute="centerY" id="UWf-rC-hV7">
+                                    <variation key="heightClass=regular-widthClass=compact" constant="-3.5"/>
+                                </constraint>
+                                <constraint firstAttribute="trailing" secondItem="bIs-li-8bz" secondAttribute="trailing" id="UaC-ap-Ulp"/>
+                                <constraint firstItem="7nf-Ia-7Kq" firstAttribute="trailing" secondItem="Mw5-GF-3oQ" secondAttribute="trailing" id="fbA-Cy-O1e"/>
+                                <constraint firstItem="Mw5-GF-3oQ" firstAttribute="top" secondItem="7nf-Ia-7Kq" secondAttribute="bottom" constant="1" id="hfD-i1-Fhe">
+                                    <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                                </constraint>
+                                <constraint firstItem="7nf-Ia-7Kq" firstAttribute="leading" secondItem="3Np-sH-ysD" secondAttribute="leading" id="j4G-mB-NeU"/>
+                                <constraint firstAttribute="bottom" secondItem="bIs-li-8bz" secondAttribute="bottom" id="oNC-iJ-Za7"/>
+                                <constraint firstItem="bIs-li-8bz" firstAttribute="leading" secondItem="3Np-sH-ysD" secondAttribute="leading" id="s6c-op-QFh"/>
+                                <constraint firstItem="bIs-li-8bz" firstAttribute="top" secondItem="Mw5-GF-3oQ" secondAttribute="bottom" id="wPf-du-0AV"/>
+                            </constraints>
+                            <variation key="default">
+                                <mask key="subviews">
+                                    <exclude reference="7nf-Ia-7Kq"/>
+                                    <exclude reference="Mw5-GF-3oQ"/>
+                                </mask>
+                                <mask key="constraints">
+                                    <exclude reference="UaC-ap-Ulp"/>
+                                    <exclude reference="oNC-iJ-Za7"/>
+                                    <exclude reference="s6c-op-QFh"/>
+                                    <exclude reference="wPf-du-0AV"/>
+                                    <exclude reference="QFZ-sI-FTg"/>
+                                    <exclude reference="SU0-8W-BVB"/>
+                                    <exclude reference="fbA-Cy-O1e"/>
+                                    <exclude reference="j4G-mB-NeU"/>
+                                    <exclude reference="RFN-Kf-txX"/>
+                                    <exclude reference="UWf-rC-hV7"/>
+                                    <exclude reference="hfD-i1-Fhe"/>
+                                </mask>
+                            </variation>
+                            <variation key="heightClass=regular-widthClass=compact">
+                                <mask key="subviews">
+                                    <include reference="7nf-Ia-7Kq"/>
+                                    <include reference="Mw5-GF-3oQ"/>
+                                </mask>
+                                <mask key="constraints">
+                                    <include reference="UaC-ap-Ulp"/>
+                                    <include reference="oNC-iJ-Za7"/>
+                                    <include reference="s6c-op-QFh"/>
+                                    <include reference="wPf-du-0AV"/>
+                                    <include reference="QFZ-sI-FTg"/>
+                                    <include reference="SU0-8W-BVB"/>
+                                    <include reference="fbA-Cy-O1e"/>
+                                    <include reference="j4G-mB-NeU"/>
+                                    <include reference="RFN-Kf-txX"/>
+                                    <include reference="UWf-rC-hV7"/>
+                                    <include reference="hfD-i1-Fhe"/>
+                                </mask>
+                            </variation>
+                        </view>
+                    </subviews>
+                    <animations/>
+                    <constraints>
+                        <constraint firstAttribute="bottom" secondItem="3Np-sH-ysD" secondAttribute="bottom" constant="1" id="4tu-Yz-TS5">
+                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                        </constraint>
+                        <constraint firstItem="3Np-sH-ysD" firstAttribute="top" secondItem="sqq-aQ-dqD" secondAttribute="top" constant="1" id="CFR-Ui-y7e">
+                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                        </constraint>
+                        <constraint firstAttribute="trailing" secondItem="3Np-sH-ysD" secondAttribute="trailing" constant="66" id="SmO-lm-bHQ">
+                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                        </constraint>
+                        <constraint firstItem="3Np-sH-ysD" firstAttribute="leading" secondItem="sqq-aQ-dqD" secondAttribute="leading" constant="66" id="feN-Ai-BHU">
+                            <variation key="heightClass=regular-widthClass=compact" constant="0.0"/>
+                        </constraint>
+                    </constraints>
+                    <variation key="default">
+                        <mask key="subviews">
+                            <exclude reference="3Np-sH-ysD"/>
+                        </mask>
+                        <mask key="constraints">
+                            <exclude reference="4tu-Yz-TS5"/>
+                            <exclude reference="CFR-Ui-y7e"/>
+                            <exclude reference="SmO-lm-bHQ"/>
+                            <exclude reference="feN-Ai-BHU"/>
+                        </mask>
+                    </variation>
+                    <variation key="heightClass=regular-widthClass=compact">
+                        <mask key="subviews">
+                            <include reference="3Np-sH-ysD"/>
+                        </mask>
+                        <mask key="constraints">
+                            <include reference="4tu-Yz-TS5"/>
+                            <include reference="CFR-Ui-y7e"/>
+                            <include reference="SmO-lm-bHQ"/>
+                            <include reference="feN-Ai-BHU"/>
+                        </mask>
+                    </variation>
+                </view>
+            </subviews>
+            <animations/>
+            <constraints>
+                <constraint firstAttribute="centerX" secondItem="4c3-gb-BwR" secondAttribute="centerX" id="0tG-Bd-2ic"/>
+                <constraint firstAttribute="trailing" secondItem="4c3-gb-BwR" secondAttribute="trailing" id="F9j-6m-8Sq"/>
+                <constraint firstAttribute="trailing" secondItem="sqq-aQ-dqD" secondAttribute="trailing" constant="15" id="J8W-3c-fXE"/>
+                <constraint firstAttribute="centerY" secondItem="4c3-gb-BwR" secondAttribute="centerY" id="JX5-Sx-hSJ"/>
+                <constraint firstItem="sqq-aQ-dqD" firstAttribute="centerY" secondItem="qLf-va-EAG" secondAttribute="centerY" id="Pfa-lH-sS7"/>
+                <constraint firstItem="4c3-gb-BwR" firstAttribute="top" secondItem="qLf-va-EAG" secondAttribute="top" id="TOG-yL-xSq"/>
+                <constraint firstAttribute="bottom" secondItem="4c3-gb-BwR" secondAttribute="bottom" id="uc7-M6-ZYJ"/>
+                <constraint firstItem="4c3-gb-BwR" firstAttribute="leading" secondItem="qLf-va-EAG" secondAttribute="leading" id="wPB-Gl-TgQ"/>
+                <constraint firstItem="sqq-aQ-dqD" firstAttribute="leading" secondItem="qLf-va-EAG" secondAttribute="leading" constant="15" id="whE-VD-v7i"/>
+            </constraints>
+            <simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina4"/>
+            <variation key="default">
+                <mask key="subviews">
+                    <exclude reference="4c3-gb-BwR"/>
+                    <exclude reference="sqq-aQ-dqD"/>
+                </mask>
+                <mask key="constraints">
+                    <exclude reference="0tG-Bd-2ic"/>
+                    <exclude reference="F9j-6m-8Sq"/>
+                    <exclude reference="JX5-Sx-hSJ"/>
+                    <exclude reference="TOG-yL-xSq"/>
+                    <exclude reference="uc7-M6-ZYJ"/>
+                    <exclude reference="wPB-Gl-TgQ"/>
+                    <exclude reference="J8W-3c-fXE"/>
+                    <exclude reference="Pfa-lH-sS7"/>
+                    <exclude reference="whE-VD-v7i"/>
+                </mask>
+            </variation>
+            <variation key="heightClass=regular-widthClass=compact">
+                <mask key="subviews">
+                    <include reference="4c3-gb-BwR"/>
+                    <include reference="sqq-aQ-dqD"/>
+                </mask>
+                <mask key="constraints">
+                    <include reference="0tG-Bd-2ic"/>
+                    <include reference="F9j-6m-8Sq"/>
+                    <include reference="JX5-Sx-hSJ"/>
+                    <include reference="TOG-yL-xSq"/>
+                    <include reference="uc7-M6-ZYJ"/>
+                    <include reference="wPB-Gl-TgQ"/>
+                    <include reference="J8W-3c-fXE"/>
+                    <include reference="Pfa-lH-sS7"/>
+                    <include reference="whE-VD-v7i"/>
+                </mask>
+            </variation>
+            <connections>
+                <outlet property="btnCancel" destination="EtP-9O-R3A" id="mr5-zY-bQM"/>
+                <outlet property="btnConfirm" destination="FKG-xS-HlM" id="zTF-29-eYq"/>
+                <outlet property="constraintBtnConfirmWidth" destination="BNE-7a-kbD" id="C9m-XW-2MO"/>
+                <outlet property="containerView" destination="3Np-sH-ysD" id="uJs-dG-r2k"/>
+                <outlet property="lblTitle" destination="IE2-24-gHl" id="DFB-ut-ky2"/>
+                <outlet property="maskingView" destination="4c3-gb-BwR" id="9bJ-5l-qJq"/>
+                <outlet property="popUpView" destination="sqq-aQ-dqD" id="BCO-MT-Cf2"/>
+                <outlet property="timePicker" destination="wQG-aC-zDU" id="qvy-Ok-l8c"/>
+                <outletCollection property="chkDays" destination="gEc-zH-hzY" id="xQT-7d-0Gf"/>
+                <outletCollection property="chkDays" destination="zGy-bM-YLk" id="pnV-7Q-T7a"/>
+                <outletCollection property="chkDays" destination="gnm-iP-QY0" id="zoV-OK-ZES"/>
+                <outletCollection property="chkDays" destination="1Oy-jS-Ud8" id="WPx-6q-GCr"/>
+                <outletCollection property="chkDays" destination="o4f-q6-59K" id="sHf-4g-cJR"/>
+                <outletCollection property="chkDays" destination="q2d-7q-uU8" id="KAu-91-2Aw"/>
+                <outletCollection property="chkDays" destination="tEs-LC-Apx" id="b2c-2i-cq1"/>
+            </connections>
+            <point key="canvasLocation" x="218" y="300"/>
+        </view>
+    </objects>
+    <resources>
+        <image name="common_checkbox_default" width="25" height="25"/>
+    </resources>
+</document>

+ 2 - 2
kneet2/Classes/ViewControllers/ThingsScreens/TriggerSelectPopupView.h

@@ -23,7 +23,7 @@
 
 //properties
 @property (weak, nonatomic) IBOutlet CustomLabel *lblTimer;
-@property (weak, nonatomic) IBOutlet CustomLabel *lblSun;
+@property (weak, nonatomic) IBOutlet CustomLabel *lblDaylight;
 @property (weak, nonatomic) IBOutlet CustomLabel *lblHeat;
 @property (weak, nonatomic) IBOutlet CustomLabel *lblDevice;
 
@@ -31,7 +31,7 @@
 - (id)initFromNib;
 
 - (IBAction)btnTimerTouched:(id)sender;
-- (IBAction)btnSunTouched:(id)sender;
+- (IBAction)btnDaylightTouched:(id)sender;
 - (IBAction)btnHeatTouched:(id)sender;
 - (IBAction)btnDeviceTouched:(id)sender;
 

+ 37 - 3
kneet2/Classes/ViewControllers/ThingsScreens/TriggerSelectPopupView.m

@@ -13,6 +13,8 @@
 #import "TriggerSelectPopupView.h"
 #import "DeviceSelectPopupView.h"
 #import "DeviceNodePopupView.h"
+#import "TimePickerPopupView.h"
+#import "DaylightPopupView.h"
 
 @interface TriggerSelectPopupView () {
     
@@ -36,8 +38,8 @@
                 [self btnTimerTouched:nil];
             }];
             
-            [_lblSun addTouchEventHandler:^(id label) {
-                [self btnSunTouched:nil];
+            [_lblDaylight addTouchEventHandler:^(id label) {
+                [self btnDaylightTouched:nil];
             }];
             
             [_lblHeat addTouchEventHandler:^(id label) {
@@ -68,11 +70,41 @@
 #pragma mark - UI Events
 
 - (IBAction)btnTimerTouched:(id)sender {
+    ItemModel *trigger = _refTriggers && _refTriggers.count ? _refTriggers[0] : nil;
     
+    BOOL isNewTrigger = !trigger.timers || !trigger.timers.count;
+    ItemModel *timeTrigger = !isNewTrigger ? trigger : [[ItemModel alloc] init];
+    
+    TimePickerPopupView *tpopup = [[TimePickerPopupView alloc] initFromNib];
+    tpopup.timeTrigger = timeTrigger;
+    [tpopup showWithCompletion:^(CustomAlertView *alertView, NSInteger buttonIndex) {
+        if (buttonIndex == 0) {//OK
+            if (isNewTrigger) {
+                [_refTriggers addObject:timeTrigger];
+                [self btnConfirmTouched:nil];
+            }
+        }
+    }];
 }
 
-- (IBAction)btnSunTouched:(id)sender {
+- (IBAction)btnDaylightTouched:(id)sender {
+    
+    ItemModel *trigger = _refTriggers && _refTriggers.count ? _refTriggers[0] : nil;
+    
+    BOOL isNewTrigger = !trigger.daylights || !trigger.daylights.count;
+    ItemModel *daylightTrigger = !isNewTrigger ? trigger : [[ItemModel alloc] init];
     
+    DaylightPopupView *dpopup = [[DaylightPopupView alloc] initFromNib];
+    dpopup.daylightTrigger = daylightTrigger;
+    
+    [dpopup showWithCompletion:^(CustomAlertView *alertView, NSInteger buttonIndex) {
+        if (buttonIndex == 0) {//OK
+            if (isNewTrigger) {
+                [_refTriggers addObject:daylightTrigger];
+                [self btnConfirmTouched:nil];
+            }
+        }
+    }];
 }
 
 - (IBAction)btnHeatTouched:(id)sender {
@@ -94,7 +126,9 @@
             [npopup showWithCompletion:^(CustomAlertView *alertView, NSInteger buttonIndex) {
                 //action add
                 if (buttonIndex == 0) {//OK
+                    npopup.refDevice.itemName = @"장치 상태가 바뀔 때";
                     npopup.refDevice.itemSubTypeCode = ksItemSubTypeCodeDevice; //트리거 타입 설정
+                    
                     [_refTriggers addObject:npopup.refDevice];
                     [self btnConfirmTouched:nil];
                 }

+ 2 - 2
kneet2/Classes/ViewControllers/ThingsScreens/TriggerSelectPopupView.xib

@@ -208,7 +208,7 @@
                                                         </mask>
                                                     </variation>
                                                     <connections>
-                                                        <action selector="btnSunTouched:" destination="qLf-va-EAG" eventType="touchUpInside" id="iV3-zn-hZY"/>
+                                                        <action selector="btnDaylightTouched:" destination="qLf-va-EAG" eventType="touchUpInside" id="DHZ-LI-kqH"/>
                                                     </connections>
                                                 </button>
                                                 <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="해뜰때 / 질때" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Clq-Jx-xBD" customClass="CustomLabel">
@@ -782,9 +782,9 @@
                 <outlet property="btnConfirm" destination="FKG-xS-HlM" id="zTF-29-eYq"/>
                 <outlet property="constraintBtnConfirmWidth" destination="BNE-7a-kbD" id="C9m-XW-2MO"/>
                 <outlet property="containerView" destination="3Np-sH-ysD" id="uJs-dG-r2k"/>
+                <outlet property="lblDaylight" destination="Clq-Jx-xBD" id="uux-Ct-3Gg"/>
                 <outlet property="lblDevice" destination="SBo-kw-gd5" id="c1v-eI-hLm"/>
                 <outlet property="lblHeat" destination="YVA-9B-Oh0" id="gmc-Hw-lZT"/>
-                <outlet property="lblSun" destination="Clq-Jx-xBD" id="cXN-wh-HbO"/>
                 <outlet property="lblTimer" destination="vnx-kb-r1r" id="ord-jS-mjX"/>
                 <outlet property="lblTitle" destination="IE2-24-gHl" id="DFB-ut-ky2"/>
                 <outlet property="maskingView" destination="4c3-gb-BwR" id="9bJ-5l-qJq"/>