Prechádzať zdrojové kódy

- 규칙추가 실행조건 부분 작업중

KaRam Kim 8 rokov pred
rodič
commit
f5f33352c6

+ 1 - 1
OneCable/Classes/Definitions.h

@@ -208,7 +208,7 @@ static NSInteger kMaxTimeOut = 60;      //운영
 
 
 //60 - 기타
-#define API_GET_LOCATION_CODES   @"/common/weather_location_codes"
+#define API_GET_LOCATION_CODES   @"/weather/location"
 
 #define URL_PATH_TERMS          @"/document/terms.html" //http://61.40.220.23:7794/document/terms.html
 #define URL_PATH_POLICY         @"/document/private-polish.html" //http://61.40.220.23:7794/document/private-polish.html

+ 20 - 20
OneCable/Classes/ViewControllers/RuelsScreens/RulesViewController.m

@@ -99,26 +99,26 @@
 }
 
 - (void)setThingsPopoverOptions {
-    //set Popover Contents
-    __weak typeof(self) weakSelf = self;
-    _popooverOptionArray = [[NSMutableArray alloc] init];
-
-    [_popooverOptionArray addObject:@{@"menuName" : NSLocalizedString(@"새로고침",nil),
-                                      @"iconName": @"img_bg_morepopup_icon_refresh",
-                                      @"target": weakSelf,
-                                      @"selector": [NSValue valueWithPointer:@selector(refreshRuleList)]}];
-
-    if ([JDFacade facade].loginUser.level > 10) {//파워유저 이상일 경우,
-        [_popooverOptionArray addObject:@{@"menuName" : NSLocalizedString(@"만들기", @"만들기"),
-                                          @"iconName": @"img_bg_morepopup_icon_edit",
-                                          @"target": weakSelf,
-                                          @"selector": [NSValue valueWithPointer:@selector(addNewRule)]}];
-        
-        [_popooverOptionArray addObject:@{@"menuName" : NSLocalizedString(@"삭제", @"삭제"),
-                                          @"iconName": @"img_bg_morepopup_icon_del",
-                                          @"target": weakSelf,
-                                          @"selector": [NSValue valueWithPointer:@selector(toggleEditMode)]}];
-    }
+//    //set Popover Contents
+//    __weak typeof(self) weakSelf = self;
+//    _popooverOptionArray = [[NSMutableArray alloc] init];
+//
+//    [_popooverOptionArray addObject:@{@"menuName" : NSLocalizedString(@"새로고침",nil),
+//                                      @"iconName": @"img_bg_morepopup_icon_refresh",
+//                                      @"target": weakSelf,
+//                                      @"selector": [NSValue valueWithPointer:@selector(refreshRuleList)]}];
+//
+//    if ([JDFacade facade].loginUser.level > 10) {//파워유저 이상일 경우,
+//        [_popooverOptionArray addObject:@{@"menuName" : NSLocalizedString(@"만들기", @"만들기"),
+//                                          @"iconName": @"img_bg_morepopup_icon_edit",
+//                                          @"target": weakSelf,
+//                                          @"selector": [NSValue valueWithPointer:@selector(addNewRule)]}];
+//        
+//        [_popooverOptionArray addObject:@{@"menuName" : NSLocalizedString(@"삭제", @"삭제"),
+//                                          @"iconName": @"img_bg_morepopup_icon_del",
+//                                          @"target": weakSelf,
+//                                          @"selector": [NSValue valueWithPointer:@selector(toggleEditMode)]}];
+//    }
 }
 
 - (void)setMoreBtnArray {

+ 2 - 2
OneCable/Classes/ViewControllers/RuelsScreens/TimePickerPopupView.m

@@ -238,7 +238,7 @@
 //    subItem.minute = ds.minute < 10 ? [NSString stringWithFormat:@"0%zd", ds.minute] : [NSString stringWithFormat:@"%zd", ds.minute];
     
     //set Days condition
-    [TimePickerPopupView setDaysCondition:_refConditions chkDays:_chkDays timeTrigger:_timeTrigger];
+    [TimePickerPopupView setDaysCondition:_refConditions chkDays:_chkDays];
     
     [super btnConfirmTouched:sender];
 }
@@ -319,7 +319,7 @@
 }
 
 
-+ (void)setDaysCondition:(NSMutableArray<ItemModel> *)conditions chkDays:(NSArray *)chkDays timeTrigger:(ItemModel*)timeTrigger {
++ (void)setDaysCondition:(NSMutableArray<ItemModel> *)conditions chkDays:(NSArray *)chkDays{
     
     [conditions enumerateObjectsUsingBlock:^(ItemModel *pCondition, NSUInteger idx, BOOL * _Nonnull stop) {
         if ([pCondition.itemSubTypeCode isEqualToString:ksConditionSubTypeCodeDaysOfWeek]) {

+ 5 - 5
OneCable/Classes/ViewControllers/RuelsScreens/WeatherLocationPopupTableViewCell.xib

@@ -1,10 +1,10 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12120" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="12121" systemVersion="16F73" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina4_0" orientation="portrait">
         <adaptation id="fullscreen"/>
     </device>
     <dependencies>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12088"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
@@ -14,7 +14,7 @@
             <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.5"/>
+                <rect key="frame" x="0.0" y="0.0" width="320" height="95"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
                     <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="경기도" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ta5-rk-3gu" customClass="CustomLabel">
@@ -32,11 +32,11 @@
                             <constraint firstAttribute="width" constant="32" id="QYe-YJ-6uj"/>
                             <constraint firstAttribute="height" constant="32" id="ldb-3N-xNj"/>
                         </constraints>
-                        <state key="normal" backgroundImage="common_radiobox_default">
+                        <state key="normal" image="common_radiobox_default" backgroundImage="common_radiobox_default">
                             <color key="titleShadowColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
                         </state>
                         <state key="disabled" backgroundImage="common_radiobox_disable"/>
-                        <state key="highlighted" backgroundImage="common_radiobox_checked"/>
+                        <state key="highlighted" image="common_radiobox_checked" backgroundImage="common_radiobox_checked"/>
                     </button>
                     <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XsH-6F-KD2">
                         <rect key="frame" x="0.0" y="93.5" width="320" height="1"/>

+ 16 - 8
OneCable/Classes/ViewControllers/RuelsScreens/WeatherLocationPopupView.m

@@ -126,22 +126,30 @@
     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];
-    }
+    tcell.rdoSelect.checked = [tcell.rdoSelect getRadioStatusFromValue];
+//    if (indexPath.row == 0 && !_isNotFirstLoading) {
+//        _isNotFirstLoading = YES;
+//        tcell.rdoSelect.checked = YES;
+//        NSLog(@"1");
+//    } else {
+//        tcell.rdoSelect.checked = [tcell.rdoSelect getRadioStatusFromValue];
+//                NSLog(@"2");
+//    }
     
     [_rgroup addRadioButton:tcell.rdoSelect];
     
     //set background image
-    if (indexPath.row % 2 == 0) {
+//    if (indexPath.row % 2 == 0) {
+//        tcell.backgroundView = [[UIImageView alloc] initWithImage:_bgCellImage1];
+//    } else {
+//        tcell.backgroundView = [[UIImageView alloc] initWithImage:_bgCellImage2];
+//    }
+//
+    if (tcell.rdoSelect.checked) {
         tcell.backgroundView = [[UIImageView alloc] initWithImage:_bgCellImage1];
     } else {
         tcell.backgroundView = [[UIImageView alloc] initWithImage:_bgCellImage2];
     }
-    
     return tcell;
 }