|
|
@@ -63,6 +63,7 @@
|
|
|
}
|
|
|
|
|
|
- (void)prepareViewDidLoad {
|
|
|
+ _lbTitle.text = [NSString stringWithFormat:@"%@ 모드 설정", _mode.modeName];
|
|
|
[self requestDeviceListForHome];
|
|
|
}
|
|
|
|
|
|
@@ -99,7 +100,9 @@
|
|
|
//현재 모드에 설정된 액션 리스트를 조회함
|
|
|
- (void)requestSceneDetailsByHomeMode {
|
|
|
|
|
|
- NSString *path = [NSString stringWithFormat:API_GET_SCENE_DETAIL_HOMEMODE, _mode.modeId];
|
|
|
+ NSArray *arr = @[_mode.modeId];
|
|
|
+ NSString *path = [[JDFacade facade] getUrlWithCustAndGroupID:API_GET_SCENE_DETAIL_HOMEMODE arguments:arr];
|
|
|
+// NSString *path = [NSString stringWithFormat:API_GET_SCENE_DETAIL_HOMEMODE, _mode.modeId];
|
|
|
|
|
|
[[RequestHandler handler] sendAsyncGetRequestAPIPath:path parameters:nil modelClass:[ItemSubListModel class] completion:^(id responseObject) {
|
|
|
if (!responseObject) {//응답결과가 잘못되었거나 없을 경우,
|
|
|
@@ -202,8 +205,9 @@
|
|
|
|
|
|
if (section == 0) {
|
|
|
HomeSettingsTitleTableViewCell *tcell = (HomeSettingsTitleTableViewCell *)[tableView dequeueReusableCellWithIdentifier:@"TitleCellIdentifier"];
|
|
|
- [tcell.imgvMode sd_setImageWithURL:[NSURL URLWithString:_mode.imageFileName] placeholderImage:nil options:SDWebImageRefreshCached];
|
|
|
- tcell.lblModeTitle.text = _mode.modeName;
|
|
|
+// [tcell.imgvMode sd_setImageWithURL:[NSURL URLWithString:_mode.imageFileName] placeholderImage:nil options:SDWebImageRefreshCached];
|
|
|
+ tcell.imgvMode.image = [UIImage imageNamed:_mode.imgName];
|
|
|
+ tcell.lblModeTitle.text = [NSString stringWithFormat:@"%@모드 실행시,\n동작할 장치를 선택하세요.",_mode.modeName];
|
|
|
|
|
|
cell = tcell;
|
|
|
} else if (section == 1) {
|
|
|
@@ -299,8 +303,11 @@
|
|
|
|
|
|
[popup showWithCompletion:^(CustomAlertView *alertView, NSInteger buttonIndex) {
|
|
|
if (buttonIndex == 0) {//ok
|
|
|
+ // todo : 수정하기
|
|
|
+ NSLog(@"selectedDevices : %@", popup.selectedDevices[0]);
|
|
|
DeviceNodePopupView *npopup = [[DeviceNodePopupView alloc] initFromNib];
|
|
|
npopup.refDevice = popup.selectedDevices[0];
|
|
|
+
|
|
|
npopup.typeCode = ksItemTypeCodeTrigger;
|
|
|
|
|
|
[npopup showWithCompletion:^(CustomAlertView *alertView, NSInteger buttonIndex) {
|
|
|
@@ -362,7 +369,8 @@
|
|
|
}
|
|
|
|
|
|
- (IBAction)btnCancelTouched:(id)sender {
|
|
|
- [[self navigationController] popToRootViewControllerAnimated:YES];
|
|
|
+ [[self navigationController] popViewControllerAnimated:YES];
|
|
|
+// [[self navigationController] popToRootViewControllerAnimated:YES];
|
|
|
// [self dismissViewControllerAnimated:YES completion:nil];
|
|
|
}
|
|
|
|