Browse Source

06.15 규칙 탑 메

eunmi.kim 8 years ago
parent
commit
8e2129bc87

+ 23 - 1
OneCable/Base.lproj/HomeHub.storyboard

@@ -2770,7 +2770,7 @@
                                                 <rect key="frame" x="0.0" y="28" width="320" height="101"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="rNM-7T-Zew" id="J6m-IL-6Yb">
-                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="101"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="100.5"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <subviews>
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="R3c-rA-Wfq">
@@ -2967,6 +2967,25 @@
                                             </mask>
                                         </variation>
                                     </view>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="68k-rs-2OV">
+                                        <rect key="frame" x="132" y="256" width="55" height="55"/>
+                                        <subviews>
+                                            <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="loading_count" translatesAutoresizingMaskIntoConstraints="NO" id="ciB-RZ-STU" customClass="CustomImageView">
+                                                <rect key="frame" x="0.0" y="0.0" width="55" height="55"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" constant="55" id="MSt-zv-fov"/>
+                                                </constraints>
+                                            </imageView>
+                                        </subviews>
+                                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
+                                        <constraints>
+                                            <constraint firstAttribute="bottom" secondItem="ciB-RZ-STU" secondAttribute="bottom" id="GqE-vH-8Na"/>
+                                            <constraint firstItem="ciB-RZ-STU" firstAttribute="top" secondItem="68k-rs-2OV" secondAttribute="top" id="Wce-l0-zLT"/>
+                                            <constraint firstAttribute="height" constant="55" id="ptc-9j-oCs"/>
+                                            <constraint firstItem="ciB-RZ-STU" firstAttribute="centerX" secondItem="68k-rs-2OV" secondAttribute="centerX" id="uJl-Ch-em6"/>
+                                            <constraint firstAttribute="width" constant="55" id="ysg-VS-5Lf"/>
+                                        </constraints>
+                                    </view>
                                 </subviews>
                                 <color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
                                 <constraints>
@@ -2977,7 +2996,9 @@
                                     <constraint firstItem="Ajl-JM-HyA" firstAttribute="top" secondItem="AZU-vA-Apl" secondAttribute="bottom" id="7fj-8u-A32"/>
                                     <constraint firstAttribute="trailing" secondItem="U5a-Bm-klI" secondAttribute="trailing" id="Bud-1W-TZP"/>
                                     <constraint firstItem="fao-Mw-Q1t" firstAttribute="top" secondItem="VeL-Gt-RVo" secondAttribute="bottom" id="Cxe-2x-Pgh"/>
+                                    <constraint firstItem="68k-rs-2OV" firstAttribute="centerX" secondItem="JFD-0P-5qO" secondAttribute="centerX" id="Gc1-Qe-o5d"/>
                                     <constraint firstAttribute="trailing" secondItem="bRJ-J9-3hr" secondAttribute="trailing" id="Hgz-30-gl9"/>
+                                    <constraint firstItem="68k-rs-2OV" firstAttribute="centerY" secondItem="JFD-0P-5qO" secondAttribute="centerY" id="Laa-ak-WXl"/>
                                     <constraint firstItem="Ajl-JM-HyA" firstAttribute="leading" secondItem="JFD-0P-5qO" secondAttribute="leading" id="Lc2-7T-eVF"/>
                                     <constraint firstItem="AZU-vA-Apl" firstAttribute="leading" secondItem="JFD-0P-5qO" secondAttribute="leading" id="MBq-R4-SK4"/>
                                     <constraint firstItem="bRJ-J9-3hr" firstAttribute="leading" secondItem="JFD-0P-5qO" secondAttribute="leading" id="NeV-IW-br4"/>
@@ -3016,6 +3037,7 @@
                     <connections>
                         <outlet property="btnCancel" destination="kZB-lu-1jQ" id="4pc-qY-mPD"/>
                         <outlet property="btnNext" destination="pYL-fB-TAi" id="Yrw-KO-hyH"/>
+                        <outlet property="imgvLoading" destination="ciB-RZ-STU" id="00x-em-Jvh"/>
                         <outlet property="tableView" destination="bRJ-J9-3hr" id="uYw-b6-a63"/>
                     </connections>
                 </viewController>

+ 13 - 13
OneCable/Base.lproj/Main.storyboard

@@ -1766,7 +1766,7 @@
                                                 <rect key="frame" x="0.0" y="22" width="320" height="86"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="dvW-0I-FNk" id="hAw-sm-QO1">
-                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="85.5"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="86"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <subviews>
                                                         <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" placeholderIntrinsicWidth="150" placeholderIntrinsicHeight="20" text="초대자" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rjb-JZ-Cf3" customClass="CustomLabel">
@@ -2273,7 +2273,7 @@
                                                 <rect key="frame" x="0.0" y="22" width="320" height="82"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="T3G-5j-2mg" id="jBD-gu-tIo">
-                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="81.5"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="82"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <subviews>
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ao4-Ln-DUx" userLabel="View - Cell">
@@ -2708,7 +2708,7 @@
                                                 <rect key="frame" x="0.0" y="22" width="320" height="82"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="13O-oy-kzr" id="qha-y8-7bn">
-                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="81.5"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="82"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <subviews>
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="2a0-x7-jc2" userLabel="View - Cell">
@@ -4084,7 +4084,7 @@
                                                 <rect key="frame" x="0.0" y="22" width="320" height="185"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="4HR-Ap-zi5" id="FYL-I3-Ct3">
-                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="184.5"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="185"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <subviews>
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="DqJ-gM-iax" userLabel="View - Cell" customClass="KNView">
@@ -4402,7 +4402,7 @@
                                                 <rect key="frame" x="0.0" y="207" width="320" height="182"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="xsB-wP-ggW" id="qqk-dn-Ftx">
-                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="181.5"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="182"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <subviews>
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="i69-BM-Qfs" userLabel="View - Cell" customClass="KNView">
@@ -4758,7 +4758,7 @@
                                                 <rect key="frame" x="0.0" y="389" width="320" height="164"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="bHe-zk-XaM" id="rhd-Oi-wkg">
-                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="163.5"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="164"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <subviews>
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9vO-bf-gRH" userLabel="View - Cell">
@@ -5555,7 +5555,7 @@
                                                 <rect key="frame" x="0.0" y="22" width="320" height="117"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="UAD-3H-XiO" id="AmL-Vh-h4h">
-                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="116.5"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="117"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <subviews>
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4Rm-nv-Cry" userLabel="View - Cell">
@@ -5648,7 +5648,7 @@
                                                 <rect key="frame" x="0.0" y="139" width="320" height="81"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="OAA-9W-GGd" id="cNB-1f-Prd">
-                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="80.5"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="81"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <subviews>
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Vqm-T4-8fo" userLabel="View - Cell">
@@ -5790,7 +5790,7 @@
                                                 <rect key="frame" x="0.0" y="220" width="320" height="162"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="VWN-Cy-OG8" id="efL-rl-GyQ">
-                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="161.5"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="162"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <subviews>
                                                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="kem-2I-4Jj" customClass="CustomButton">
@@ -6070,7 +6070,7 @@
                                                 <rect key="frame" x="0.0" y="28" width="320" height="151"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="OiY-nb-fUX" id="u2m-Xz-g6m">
-                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="150.5"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="151"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <subviews>
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6Qt-zh-SIL" userLabel="View - cell">
@@ -6541,7 +6541,7 @@
                                                 <rect key="frame" x="0.0" y="22" width="320" height="82"/>
                                                 <autoresizingMask key="autoresizingMask"/>
                                                 <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="rnB-by-AAV" id="OYL-xo-VJL">
-                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="81.5"/>
+                                                    <rect key="frame" x="0.0" y="0.0" width="320" height="82"/>
                                                     <autoresizingMask key="autoresizingMask"/>
                                                     <subviews>
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="HJD-h4-u7i" userLabel="View - Cell">
@@ -6640,7 +6640,7 @@
                                                         <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Sxo-b0-E7i" userLabel="View - line">
                                                             <rect key="frame" x="0.0" y="80.5" width="320" height="1"/>
                                                             <subviews>
-                                                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="common_bg_line_01" translatesAutoresizingMaskIntoConstraints="NO" id="IVx-9N-QmT">
+                                                                <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="common_bg_line_01" translatesAutoresizingMaskIntoConstraints="NO" id="IVx-9N-QmT">
                                                                     <rect key="frame" x="0.0" y="0.0" width="240" height="1"/>
                                                                     <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                                                 </imageView>
@@ -6937,7 +6937,7 @@
                                             <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="XTY-Pr-k3y" userLabel="View - line">
                                                 <rect key="frame" x="0.0" y="87" width="320" height="1"/>
                                                 <subviews>
-                                                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" fixedFrame="YES" image="common_bg_line_01" translatesAutoresizingMaskIntoConstraints="NO" id="7XB-9D-goG">
+                                                    <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="common_bg_line_01" translatesAutoresizingMaskIntoConstraints="NO" id="7XB-9D-goG">
                                                         <rect key="frame" x="0.0" y="0.0" width="240" height="1"/>
                                                         <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
                                                     </imageView>

File diff suppressed because it is too large
+ 126 - 126
OneCable/Base.lproj/Things.storyboard


+ 0 - 2
OneCable/Classes/ViewControllers/HomeHubScreens/HomeHubWifiPasswdInputViewController.m

@@ -158,8 +158,6 @@
 
 - (BOOL)textFieldShouldReturn:(UITextField *)textField {
     
-    NSLog(@"wifi pass textFieldShouldReturn");
-    
     if (textField.text.length > 0) {
         
         [self.view endEditing:YES];

+ 1 - 0
OneCable/Classes/ViewControllers/HomeHubScreens/HomeHubWifiSearchSuccessViewController.h

@@ -17,6 +17,7 @@
 @property (weak, nonatomic) IBOutlet CustomTableView *tableView;  //테이블뷰
 @property (weak, nonatomic) IBOutlet CustomButton *btnCancel;  // 취소 버튼
 @property (weak, nonatomic) IBOutlet CustomButton *btnNext;  // 다음 버튼
+@property (weak, nonatomic) IBOutlet CustomImageView *imgvLoading;  // 로딩 이미지
 
 @property (strong, nonatomic) NSMutableArray *wifiList;
 

+ 145 - 10
OneCable/Classes/ViewControllers/HomeHubScreens/HomeHubWifiSearchSuccessViewController.m

@@ -13,7 +13,18 @@
 
     BLEServiceHandler *bleService;
     BLEWLanModel *selectedWLanModel;
-
+    
+    
+    //비밀번호 없는 경우
+    
+    BOOL updateSSID;
+    BOOL updateBSSID;
+    BOOL updateIPSet;
+    BOOL updateIPAddr;
+    
+    NSTimer *_timer;
+    NSInteger _elapsedSeconds;
+    
 }
 @end
 
@@ -48,9 +59,66 @@
     bleService = [BLEServiceHandler sharedManager];
     bleService.delegate = self;
     
+    updateSSID = updateBSSID = updateIPSet = updateIPAddr = NO;
+    
     [_tableView reloadData];
 }
 
+
+
+-(void)startLoading:(BOOL)isStart {
+    
+    _imgvLoading.hidden = !isStart;
+    
+    if (isStart) {
+        
+        _elapsedSeconds = kMaxTimeOut;
+        
+        if (!_timer) {
+            _timer = [NSTimer scheduledTimerWithTimeInterval:1.0f target:self selector:@selector(updateInclusionStatus) userInfo:nil repeats:YES];
+        }
+        
+        dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.1f * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
+            if ([_imgvLoading.layer animationForKey:@"SpinAnimation"] == nil) {
+                CABasicAnimation* animation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
+                animation.fromValue = [NSNumber numberWithFloat:0.0f];
+                animation.toValue = [NSNumber numberWithFloat: 2*M_PI];
+                animation.duration = 2.0f;
+                animation.repeatCount = INFINITY;
+                [_imgvLoading.layer addAnimation:animation forKey:@"SpinAnimation"];
+            }
+        });
+    }
+    else {
+        
+        _elapsedSeconds = kMaxTimeOut;
+        
+        if (_timer) {
+            [_timer invalidate];
+            _timer = nil;
+        }
+        if ([_imgvLoading.layer animationForKey:@"SpinAnimation"] != nil) {
+            [_imgvLoading.layer removeAnimationForKey:@"SpinAnimation"];
+        }
+        
+    }
+    
+}
+
+- (void)updateInclusionStatus {
+    
+    dispatch_async(dispatch_get_main_queue(), ^(void) {
+        
+        _elapsedSeconds--;
+        
+        if (_elapsedSeconds == 0) {
+            
+            [self startLoading:NO];
+        }
+    });
+}
+
+
 #pragma mark - UITableView DataSource & Delegate
 - (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
     
@@ -102,6 +170,35 @@
 }
 
 
+#pragma mark - user Event
+- (IBAction)btnCancelTouched:(id)sender {
+    
+    [self.navigationController popToRootViewControllerAnimated:YES];
+}
+
+- (IBAction)btnNextTouched:(id)sender {
+    
+    if (selectedWLanModel != nil) {
+        
+        if (EQUALS(selectedWLanModel.security, @"none")) {
+            
+            [self startLoading:YES];
+            [bleService enableDHCP];
+            [bleService readAndNotifyCharacteristicUUID:kBLEChrStDHCPArg isNotify:NO];
+            
+            updateSSID = updateBSSID = updateIPSet = updateIPAddr = NO;
+
+        }
+        else {
+
+            [bleService setWiFiSSID:selectedWLanModel.ssid];
+            [bleService readAndNotifyCharacteristicUUID:kBLEChrStSSIDArg
+                                               isNotify:NO];
+        }
+    }
+}
+
+
 #pragma mark - ble delegate
 - (void)BLEWiFiSSIDUpdate:(NSString*)ssid {
     
@@ -125,20 +222,58 @@
 }
 
 
-#pragma mark - user Event
-- (IBAction)btnNextTouched:(id)sender {
+//enableDHCP
+- (void)BLEWiFiDHCPUpdate:(id)data {
     
-    if (selectedWLanModel != nil) {
+    [bleService applyWiFiSettingInfo];
+    [bleService readAndNotifyCharacteristicUUID:kBLEChrRdConInfo isNotify:YES];
+    
+}
+
+//kBLEChrRdConInfo
+- (void)BLEWiFiConnectionUpdate:(CBCharacteristic *)info {
+    
+    NSLog(@"Connection Update!");
+    
+    NSString *value = [bleService hexStringValue:info] ;
+    
+    if (value.length > 0 &&
+        EQUALS([value substringFromIndex:value.length-1], @"1")) {
         
-        [bleService setWiFiSSID:selectedWLanModel.ssid];
-        [bleService readAndNotifyCharacteristicUUID:kBLEChrStSSIDArg
-         isNotify:NO];
+        [bleService readConnectionWiFiInfo];
     }
+    
 }
 
-
-- (IBAction)btnCancelTouched:(id)sender {
+//readConnectionWiFiInfo
+- (void)BLEWiFiConnectionInfoUpdateWithKey:(NSString *)kBLEChr
+                                    result:(NSString *)result {
     
-    [self.navigationController popToRootViewControllerAnimated:YES];
+    NSLog(@"Connection Info Update!") ;
+    
+    if (EQUALS(kBLEChr, kBLEChrRdSSID)) {
+        updateSSID = YES;
+    }
+    else if(EQUALS(kBLEChr, kBLEChrRdBSSID)) {
+        updateBSSID = YES;
+    }
+    else if(EQUALS(kBLEChr, kBLEChrRnIpSet)) {
+        updateIPSet = YES;
+    }
+    else if(EQUALS(kBLEChr, kBLEChrRnIpAddr)) {
+        updateIPAddr = YES;
+    }
+    
+    // 연결 확인 완료
+    if (updateSSID && updateBSSID && updateIPSet && updateIPAddr) {
+        
+        [self startLoading:NO];
+        
+        UIViewController *vc = [CommonUtil instantiateViewControllerWithIdentifier:@"HomeHubUpdateCompleteViewController" storyboardName:@"HomeHub"];
+        
+        [self.navigationController pushViewController:vc animated:YES];
+        
+    }
 }
+
 @end

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

@@ -136,7 +136,7 @@
                     btnModel = [[MoreBtnModel alloc] initWithTyep:Add isEnable:YES];
                     break;
                 case 1:
-                    btnModel = [[MoreBtnModel alloc] initWithTyep:Del isEnable:YES];
+                    btnModel = [[MoreBtnModel alloc] initWithTyep:Del isEnable:_ruleList.count > 0];
                     break;
                 case 2:
                     btnModel = [[MoreBtnModel alloc] initWithTyep:Refresh isEnable:YES];