2 Commits 65e89eae1a ... d074e4abbb

Author SHA1 Message Date
  mortimer d074e4abbb 回家在写,胳膊疼 6 years ago
  mortimer 0b8d4d71c1 a 6 years ago

+ 34 - 0
KXCardHelp.xcodeproj/project.pbxproj

@@ -34,6 +34,11 @@
34 34
 		111E1E2E211C51E100A51BE9 /* CFNetwork.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 111E1E2D211C51E000A51BE9 /* CFNetwork.framework */; };
35 35
 		111E1E30211C51EA00A51BE9 /* CoreTelephony.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 111E1E2F211C51EA00A51BE9 /* CoreTelephony.framework */; };
36 36
 		11239E7820F870A2004CFA0E /* LVKBAlertController.m in Sources */ = {isa = PBXBuildFile; fileRef = 11239E7720F870A2004CFA0E /* LVKBAlertController.m */; };
37
+		113B8ADB21537A7300C00D96 /* LVKBNewHomeTableViewCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 113B8AD921537A7300C00D96 /* LVKBNewHomeTableViewCell.m */; };
38
+		113B8ADC21537A7300C00D96 /* LVKBNewHomeTableViewCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 113B8ADA21537A7300C00D96 /* LVKBNewHomeTableViewCell.xib */; };
39
+		113B8AE02153885D00C00D96 /* LVKBNewHomeModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 113B8ADF2153885D00C00D96 /* LVKBNewHomeModel.m */; };
40
+		113B8AE32153B0E300C00D96 /* LVKBNewSignInView.m in Sources */ = {isa = PBXBuildFile; fileRef = 113B8AE22153B0E300C00D96 /* LVKBNewSignInView.m */; };
41
+		113B8AE52153B0F200C00D96 /* LVKBNewSignInView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 113B8AE42153B0F200C00D96 /* LVKBNewSignInView.xib */; };
37 42
 		1162EF1F20FDD74400B766BF /* creditCard.html in Resources */ = {isa = PBXBuildFile; fileRef = 1162EF1C20FDD74200B766BF /* creditCard.html */; };
38 43
 		1162EF2020FDD74400B766BF /* areement.html in Resources */ = {isa = PBXBuildFile; fileRef = 1162EF1D20FDD74300B766BF /* areement.html */; };
39 44
 		1162EF2120FDD74400B766BF /* savingsCard.html in Resources */ = {isa = PBXBuildFile; fileRef = 1162EF1E20FDD74400B766BF /* savingsCard.html */; };
@@ -218,6 +223,14 @@
218 223
 		111E1E2F211C51EA00A51BE9 /* CoreTelephony.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreTelephony.framework; path = System/Library/Frameworks/CoreTelephony.framework; sourceTree = SDKROOT; };
219 224
 		11239E7620F870A2004CFA0E /* LVKBAlertController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LVKBAlertController.h; sourceTree = "<group>"; };
220 225
 		11239E7720F870A2004CFA0E /* LVKBAlertController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LVKBAlertController.m; sourceTree = "<group>"; };
226
+		113B8AD821537A7300C00D96 /* LVKBNewHomeTableViewCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LVKBNewHomeTableViewCell.h; sourceTree = "<group>"; };
227
+		113B8AD921537A7300C00D96 /* LVKBNewHomeTableViewCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LVKBNewHomeTableViewCell.m; sourceTree = "<group>"; };
228
+		113B8ADA21537A7300C00D96 /* LVKBNewHomeTableViewCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LVKBNewHomeTableViewCell.xib; sourceTree = "<group>"; };
229
+		113B8ADE2153885D00C00D96 /* LVKBNewHomeModel.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LVKBNewHomeModel.h; sourceTree = "<group>"; };
230
+		113B8ADF2153885D00C00D96 /* LVKBNewHomeModel.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LVKBNewHomeModel.m; sourceTree = "<group>"; };
231
+		113B8AE12153B0E300C00D96 /* LVKBNewSignInView.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = LVKBNewSignInView.h; sourceTree = "<group>"; };
232
+		113B8AE22153B0E300C00D96 /* LVKBNewSignInView.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = LVKBNewSignInView.m; sourceTree = "<group>"; };
233
+		113B8AE42153B0F200C00D96 /* LVKBNewSignInView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = LVKBNewSignInView.xib; sourceTree = "<group>"; };
221 234
 		1162EF1C20FDD74200B766BF /* creditCard.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = creditCard.html; sourceTree = "<group>"; };
222 235
 		1162EF1D20FDD74300B766BF /* areement.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = areement.html; sourceTree = "<group>"; };
223 236
 		1162EF1E20FDD74400B766BF /* savingsCard.html */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; path = savingsCard.html; sourceTree = "<group>"; };
@@ -590,6 +603,15 @@
590 603
 			path = MiPush;
591 604
 			sourceTree = "<group>";
592 605
 		};
606
+		113B8ADD2153883D00C00D96 /* Model */ = {
607
+			isa = PBXGroup;
608
+			children = (
609
+				113B8ADE2153885D00C00D96 /* LVKBNewHomeModel.h */,
610
+				113B8ADF2153885D00C00D96 /* LVKBNewHomeModel.m */,
611
+			);
612
+			path = Model;
613
+			sourceTree = "<group>";
614
+		};
593 615
 		1162EF1B20FDD72A00B766BF /* HTML */ = {
594 616
 			isa = PBXGroup;
595 617
 			children = (
@@ -741,6 +763,7 @@
741 763
 		1175554D21525CC70090C1B8 /* NewHome */ = {
742 764
 			isa = PBXGroup;
743 765
 			children = (
766
+				113B8ADD2153883D00C00D96 /* Model */,
744 767
 				4030486D21533FF000E36940 /* View */,
745 768
 				1175554E21525D130090C1B8 /* VC */,
746 769
 			);
@@ -1638,6 +1661,12 @@
1638 1661
 			children = (
1639 1662
 				4030486E215340C800E36940 /* LVKBNewHomeTableViewHeader.h */,
1640 1663
 				4030486F215340C800E36940 /* LVKBNewHomeTableViewHeader.m */,
1664
+				113B8AD821537A7300C00D96 /* LVKBNewHomeTableViewCell.h */,
1665
+				113B8AD921537A7300C00D96 /* LVKBNewHomeTableViewCell.m */,
1666
+				113B8ADA21537A7300C00D96 /* LVKBNewHomeTableViewCell.xib */,
1667
+				113B8AE12153B0E300C00D96 /* LVKBNewSignInView.h */,
1668
+				113B8AE22153B0E300C00D96 /* LVKBNewSignInView.m */,
1669
+				113B8AE42153B0F200C00D96 /* LVKBNewSignInView.xib */,
1641 1670
 			);
1642 1671
 			path = View;
1643 1672
 			sourceTree = "<group>";
@@ -1747,12 +1776,14 @@
1747 1776
 				119A9FCB2138E0350020C78E /* 3.png in Resources */,
1748 1777
 				1162EF2020FDD74400B766BF /* areement.html in Resources */,
1749 1778
 				119AA0132138E0350020C78E /* LVKBPersonMainInfoTableViewCell.xib in Resources */,
1779
+				113B8AE52153B0F200C00D96 /* LVKBNewSignInView.xib in Resources */,
1750 1780
 				119A9FCE2138E0350020C78E /* close.png in Resources */,
1751 1781
 				119AA0242138E0350020C78E /* LVKBPersonTableViewCell.xib in Resources */,
1752 1782
 				1162EF2120FDD74400B766BF /* savingsCard.html in Resources */,
1753 1783
 				1162EF1F20FDD74400B766BF /* creditCard.html in Resources */,
1754 1784
 				119AA0192138E0350020C78E /* LVKBPersonRecordTableViewCell.xib in Resources */,
1755 1785
 				1116945B20E086160017E4AA /* Main.storyboard in Resources */,
1786
+				113B8ADC21537A7300C00D96 /* LVKBNewHomeTableViewCell.xib in Resources */,
1756 1787
 				119A9FCC2138E0350020C78E /* 4.png in Resources */,
1757 1788
 				119A9FC92138E0350020C78E /* 1.png in Resources */,
1758 1789
 				119AA00F2138E0350020C78E /* LVKBPersonDiscountCouponTableViewCell.xib in Resources */,
@@ -1844,6 +1875,7 @@
1844 1875
 				119A9FFC2138E0350020C78E /* LVKBHomeTableView.m in Sources */,
1845 1876
 				119AA0252138E0350020C78E /* NineLockView.m in Sources */,
1846 1877
 				11239E7820F870A2004CFA0E /* LVKBAlertController.m in Sources */,
1878
+				113B8ADB21537A7300C00D96 /* LVKBNewHomeTableViewCell.m in Sources */,
1847 1879
 				119A9FCF2138E0350020C78E /* KXAdAlertView.m in Sources */,
1848 1880
 				119AA0142138E0350020C78E /* LVKBPersonModel.m in Sources */,
1849 1881
 				119AA0162138E0350020C78E /* LVKBPersonRecordDetailsViewController.m in Sources */,
@@ -1909,6 +1941,7 @@
1909 1941
 				119AA00B2138E0350020C78E /* LVKBPersonDiscountCouponModel.m in Sources */,
1910 1942
 				1114D60E20EB56B20094AC81 /* PublicFunction.m in Sources */,
1911 1943
 				119AA0232138E0350020C78E /* LVKBPersonTableViewCell.m in Sources */,
1944
+				113B8AE32153B0E300C00D96 /* LVKBNewSignInView.m in Sources */,
1912 1945
 				119A9FE22138E0350020C78E /* LVKBHomeCardsChildViewController.m in Sources */,
1913 1946
 				119A9FF92138E0350020C78E /* KXNewsTableViewCell.m in Sources */,
1914 1947
 				1114D62020ECCF290094AC81 /* UIImage+Handle.m in Sources */,
@@ -1919,6 +1952,7 @@
1919 1952
 				119A9FF02138E0350020C78E /* LVKBHomeCreditCardTableViewCell.m in Sources */,
1920 1953
 				1114D61520EB62CA0094AC81 /* MBProgressHUD+Extension.m in Sources */,
1921 1954
 				11A5475520E4FEC1008884B8 /* UIView+ViewController.m in Sources */,
1955
+				113B8AE02153885D00C00D96 /* LVKBNewHomeModel.m in Sources */,
1922 1956
 				111589292100390D002C3DA7 /* UITableView+CHHandle.m in Sources */,
1923 1957
 				119AA0272138E0350020C78E /* LVKBLoginViewController.m in Sources */,
1924 1958
 				119A9FDE2138E0350020C78E /* LVKBManualInsertBankCardViewController.m in Sources */,

BIN
KXCardHelp.xcworkspace/xcuserdata/mortimer.xcuserdatad/UserInterfaceState.xcuserstate


+ 17 - 1
KXCardHelp.xcworkspace/xcuserdata/mortimer.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist

@@ -20,7 +20,7 @@
20 20
             ignoreCount = "0"
21 21
             continueAfterRunningActions = "No"
22 22
             filePath = "KXCardHelp/AppDelegate/AppDelegate.m"
23
-            timestampString = "557045482.584453"
23
+            timestampString = "559132771.74721"
24 24
             startingColumnNumber = "9223372036854775807"
25 25
             endingColumnNumber = "9223372036854775807"
26 26
             startingLineNumber = "217"
@@ -45,5 +45,21 @@
45 45
             landmarkType = "7">
46 46
          </BreakpointContent>
47 47
       </BreakpointProxy>
48
+      <BreakpointProxy
49
+         BreakpointExtensionID = "Xcode.Breakpoint.FileBreakpoint">
50
+         <BreakpointContent
51
+            shouldBeEnabled = "Yes"
52
+            ignoreCount = "0"
53
+            continueAfterRunningActions = "No"
54
+            filePath = "KXCardHelp/Main/Home/Card/UserData/VC/LVKBUserDataViewController.m"
55
+            timestampString = "559122240.1264"
56
+            startingColumnNumber = "9223372036854775807"
57
+            endingColumnNumber = "9223372036854775807"
58
+            startingLineNumber = "43"
59
+            endingLineNumber = "43"
60
+            landmarkName = "-request"
61
+            landmarkType = "7">
62
+         </BreakpointContent>
63
+      </BreakpointProxy>
48 64
    </Breakpoints>
49 65
 </Bucket>

+ 2 - 2
KXCardHelp/AppDelegate/HFile/LVKBDefineHeader.h

@@ -46,8 +46,8 @@
46 46
 #define  UMAPP_KEY  @"5b7e1f9fb27b0a6573000010"//--
47 47
 #define  BUGLY_ID   @"2b8be66cb7"//--
48 48
 #define APPLE_APP_ID @"1433874143"//--
49
-#define BAIDU_APP_ID @"fLeeuCReuMCTlBFeQzIKjXhm"//--
50
-#define BAIDU_SECRET @"98fXjaxW73HHCt4QhYmhfCdCu4md2NgK"//--
49
+#define BAIDU_APP_ID @"RmyUkQQ5zGPztDATQAcb8LRB"//--
50
+#define BAIDU_SECRET @"v05kUTuG3gwvXKdgLoXTbMl7RCgOWz0b"//--
51 51
 //公钥
52 52
 #define RSAPublicKey @"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4G6ZCXm4oFZD4cW3wHxUPBfeEKJJmfyGruOMwvT4W/r6FbD1ptEPrcnCDjmhqXwA2egxEWWojgXwxd7/JXFYRxiahPcwQBK4UfY7C7evpwp5J2v/v6FMeV6k/DWaVHX6z7un8W12E6LEosAFL+JLF11y3cXaHwITkQMToVhfz9QIDAQAB"
53 53
 

+ 1 - 1
KXCardHelp/Category/Color/UIColor+CHColor.m

@@ -16,7 +16,7 @@
16 16
  */
17 17
 + (instancetype)baseColor{
18 18
     
19
-    return [self CHColorWithHex:0x0CBD8E];
19
+    return [self CHColorWithHex:0x8E80F9];
20 20
 }
21 21
 
22 22
 +(instancetype)titleColor

+ 99 - 9
KXCardHelp/GS/NewCard/VC/LVKBNewCardViewController.m

@@ -7,30 +7,120 @@
7 7
 //
8 8
 
9 9
 #import "LVKBNewCardViewController.h"
10
-
10
+#import "LVKBHomeCardsTableViewCell.h"
11
+#import "LVKBHomeCardsModel.h"
11 12
 @interface LVKBNewCardViewController ()
13
+<
14
+UITableViewDelegate,
15
+UITableViewDataSource,
16
+CHHomeCardsTableViewCellDelegate
17
+>
18
+@property(nonatomic,strong) UIButton       *createCard;
19
+@property(nonatomic,strong) UITableView    *tableView;
20
+@property(nonatomic,strong) NSMutableArray *dataArray;
12 21
 @end
13 22
 
14 23
 @implementation LVKBNewCardViewController
15 24
 
16 25
 - (void)viewDidLoad {
17 26
     [super viewDidLoad];
18
-    // Do any additional setup after loading the view.
27
+    [self.navigationBar setNavTitle:@"信用卡管理"];
28
+    self.navigationBar.showNavigationBarBottomLine=YES;
29
+    [self initUI];
30
+    [self adjustUI];
31
+}
32
+
33
+-(void)initUI{
34
+    [self.view addSubview:self.createCard];
35
+    [self.view addSubview:self.tableView];
36
+    
19 37
 }
20 38
 
39
+-(void)adjustUI{
40
+    [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
41
+        make.left.right.mas_equalTo(0);
42
+        make.bottom.mas_equalTo(-50);
43
+        make.top.equalTo(self.createCard.mas_bottom).offset(10);
44
+    }];
45
+}
46
+
47
+
48
+
21 49
 - (void)didReceiveMemoryWarning {
22 50
     [super didReceiveMemoryWarning];
23 51
     // Dispose of any resources that can be recreated.
24 52
 }
25 53
 
26
-/*
27
-#pragma mark - Navigation
28 54
 
29
-// In a storyboard-based application, you will often want to do a little preparation before navigation
30
-- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
31
-    // Get the new view controller using [segue destinationViewController].
32
-    // Pass the selected object to the new view controller.
55
+
56
+
57
+
58
+#pragma mark -代理
59
+
60
+- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
61
+    return self.dataArray.count+1;
62
+}
63
+- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
64
+    LVKBHomeCardsTableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:@"cell"];
65
+//    LVKBHomeCardsModel *model=self.dataArray[indexPath.row];
66
+//    if (indexPath.row==0) {
67
+//        model.is_main=@"1";
68
+//    }
69
+//    cell.model=model;
70
+//    cell.cellDelegate=self;
71
+//    cell.indexPath=indexPath;
72
+//    cell.selectionStyle=UITableViewCellSelectionStyleNone;
73
+    return cell;
74
+}
75
+- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
76
+    return 144;
33 77
 }
34
-*/
78
+
79
+
80
+-(void)jcy_homeCardsCellDeleteByIndexPath:(NSIndexPath *)indexPath{
81
+    
82
+    
83
+    
84
+}
85
+
86
+
87
+#pragma mark -懒加载
88
+-(UIButton *)createCard{
89
+    if (!_createCard) {
90
+        _createCard=[UIButton buttonWithType:UIButtonTypeCustom];
91
+        [_createCard setTitle:@"+添加信用卡" forState:UIControlStateNormal];
92
+        [_createCard setTitleColor:[UIColor baseColor] forState:UIControlStateNormal];
93
+        _createCard.titleLabel.font=[UIFont systemFontOfSize:15];
94
+        _createCard.backgroundColor=[UIColor whiteColor];
95
+        _createCard.layer.cornerRadius=8;
96
+        _createCard.layer.masksToBounds=YES;
97
+        [[_createCard rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
98
+//            [self requestCheckIdentityStatus];
99
+        }];
100
+        _createCard.frame=CGRectMake(FITSIZE(12), NavBarHeight+10, SCREEN_WIDTH-2*FITSIZE(12), 46);
101
+    }
102
+    return _createCard;
103
+}
104
+
105
+
106
+-(UITableView *)tableView{
107
+    if (!_tableView) {
108
+        _tableView=[[UITableView alloc]init];
109
+        _tableView.delegate=self;
110
+        _tableView.dataSource=self;
111
+        _tableView.backgroundColor=self.view.backgroundColor;
112
+        _tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
113
+        [_tableView registerNib:[UINib nibWithNibName:@"LVKBHomeCardsTableViewCell" bundle:nil] forCellReuseIdentifier:@"cell"];
114
+    }
115
+    return _tableView;
116
+}
117
+
118
+-(NSMutableArray *)dataArray{
119
+    if (!_dataArray) {
120
+        _dataArray=[NSMutableArray array];
121
+    }
122
+    return _dataArray;
123
+}
124
+
35 125
 
36 126
 @end

+ 29 - 0
KXCardHelp/GS/NewHome/Model/LVKBNewHomeModel.h

@@ -0,0 +1,29 @@
1
+//
2
+//  LVKBNewHomeModel.h
3
+//  KXCardHelp
4
+//
5
+//  Created by jcymac on 2018/9/20.
6
+//  Copyright © 2018年 jcymac. All rights reserved.
7
+//
8
+
9
+#import <Foundation/Foundation.h>
10
+
11
+NS_ASSUME_NONNULL_BEGIN
12
+
13
+@interface LVKBNewHomeModel : NSObject
14
+
15
+@property(nonatomic)NSInteger     index;
16
+
17
+@property(nonatomic,copy)NSString *title;
18
+
19
+@property(nonatomic)NSInteger     day;
20
+
21
+@property(nonatomic)NSInteger     hour;
22
+
23
+@property(nonatomic)NSInteger     second;
24
+
25
+@property(nonatomic)BOOL          isOpen;
26
+
27
+@end
28
+
29
+NS_ASSUME_NONNULL_END

+ 13 - 0
KXCardHelp/GS/NewHome/Model/LVKBNewHomeModel.m

@@ -0,0 +1,13 @@
1
+//
2
+//  LVKBNewHomeModel.m
3
+//  KXCardHelp
4
+//
5
+//  Created by jcymac on 2018/9/20.
6
+//  Copyright © 2018年 jcymac. All rights reserved.
7
+//
8
+
9
+#import "LVKBNewHomeModel.h"
10
+
11
+@implementation LVKBNewHomeModel
12
+
13
+@end

+ 103 - 10
KXCardHelp/GS/NewHome/VC/LVKBNewHomeViewController.m

@@ -8,23 +8,29 @@
8 8
 
9 9
 #import "LVKBNewHomeViewController.h"
10 10
 #import "LVKBNewHomeTableViewHeader.h"
11
+#import "LVKBNewHomeTableViewCell.h"
12
+
13
+#import "LVKBNewHomeModel.h"
11 14
 @interface LVKBNewHomeViewController ()
12 15
 <
13 16
 UITableViewDelegate,
14
-UITableViewDataSource
17
+UITableViewDataSource,
18
+LVKBNewHomeTableViewCellDelegate,
19
+LVKBNewHomeTableViewHeaderDelegate
15 20
 >
16 21
     
17 22
 @property(nonatomic,strong)UIImageView *topImageView;
23
+@property(nonatomic,strong)UIButton    *signInBtn;
18 24
 @property(nonatomic,strong)UITableView *tableView;
19
-@property(nonatomic,strong)UIImageView *centerView;
25
+@property(nonatomic,strong)UIImageView                *centerView;
20 26
 @property(nonatomic,strong)LVKBNewHomeTableViewHeader *tableViewHeader;
27
+@property(nonatomic,strong)NSMutableArray     *dataArray;
21 28
 @end
22 29
 
23 30
 @implementation LVKBNewHomeViewController
24 31
 
25 32
 - (void)viewDidLoad {
26 33
     [super viewDidLoad];
27
-//    self.view.backgroundColor=[UIColor redColor];
28 34
     [self initUI];
29 35
     [self adjustUI];
30 36
     
@@ -34,6 +40,7 @@ UITableViewDataSource
34 40
     [self.view addSubview:self.topImageView];
35 41
     [self.view addSubview:self.tableView];
36 42
     [self.view addSubview:self.centerView];
43
+    [self.view addSubview:self.signInBtn];
37 44
     
38 45
 }
39 46
 
@@ -42,34 +49,90 @@ UITableViewDataSource
42 49
         make.left.right.top.mas_equalTo(0);
43 50
         make.height.mas_equalTo(171);
44 51
     }];
52
+    [self.signInBtn mas_makeConstraints:^(MASConstraintMaker *make) {
53
+        make.right.mas_equalTo((-FITSIZE(10)));
54
+        make.top.mas_equalTo(10+NavSafeBarHeight);
55
+        make.height.mas_equalTo(22);
56
+        make.width.mas_equalTo(56);
57
+    }];
45 58
     [self.centerView mas_makeConstraints:^(MASConstraintMaker *make) {
46 59
         make.left.mas_equalTo(FITSIZE(14));
47 60
         make.right.mas_equalTo(FITSIZE(-14));
48
-        make.top.equalTo(self.topImageView.mas_bottom).offset(-50);
61
+        make.top.equalTo(self.topImageView.mas_bottom).offset(-70);
49 62
         make.height.mas_equalTo(102);
50 63
     }];
51 64
     [self.tableView mas_makeConstraints:^(MASConstraintMaker *make) {
52
-        make.left.right.mas_equalTo(0);
65
+        make.left.mas_equalTo(FITSIZE(14));
66
+        make.right.mas_equalTo(FITSIZE((-14)));
53 67
         make.top.equalTo(self.topImageView.mas_bottom);
54 68
         make.bottom.mas_equalTo(FITSIZE((-50)));
55 69
     }];
56 70
     
71
+    UILabel *label=[self.centerView viewWithTag:1001];
72
+    [label mas_makeConstraints:^(MASConstraintMaker *make) {
73
+        make.centerX.equalTo(self.centerView.mas_centerX);
74
+        make.centerY.equalTo(self.centerView.mas_centerY);
75
+    }];
57 76
 }
58 77
 
59 78
 - (void)didReceiveMemoryWarning {
60 79
     [super didReceiveMemoryWarning];
61
-    
62
-    
63 80
 }
64 81
 
65 82
 
66 83
 - (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
67
-    return 0;
84
+    return self.dataArray.count;
68 85
 }
69 86
 - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
70
-    return nil;
87
+    LVKBNewHomeTableViewCell *cell=[tableView dequeueReusableCellWithIdentifier:@"cell"];
88
+    LVKBNewHomeModel *model=self.dataArray[indexPath.row];
89
+    model.index=indexPath.row;
90
+    [cell setModel:model];
91
+    cell.layer.cornerRadius=5;
92
+    cell.layer.masksToBounds=YES;
93
+    return cell;
71 94
 }
72 95
 
96
+-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
97
+    return 86;
98
+}
99
+
100
+-(void)switchActionByIndex:(NSInteger)index status:(BOOL)status{
101
+    LVKBNewHomeModel *model=self.dataArray[index];
102
+    model.isOpen=status;
103
+    
104
+}
105
+- (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath {
106
+    return YES;
107
+}
108
+- (UITableViewCellEditingStyle)tableView:(UITableView *)tableView editingStyleForRowAtIndexPath:(NSIndexPath *)indexPath {
109
+    return UITableViewCellEditingStyleDelete;
110
+}
111
+
112
+//设置进入编辑状态时,Cell不会缩进
113
+- (BOOL)tableView: (UITableView *)tableView shouldIndentWhileEditingRowAtIndexPath:(NSIndexPath *)indexPath {
114
+    return NO;
115
+}
116
+
117
+//点击删除
118
+- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath {
119
+    //在这里实现删除操作
120
+    //删除数据,和删除动画
121
+    [self.dataArray removeObjectAtIndex:indexPath.row];
122
+    [tableView deleteRowsAtIndexPaths:@[indexPath] withRowAnimation:UITableViewRowAnimationLeft];
123
+}
124
+
125
+-(NSString *)tableView:(UITableView *)tableView titleForDeleteConfirmationButtonForRowAtIndexPath:(NSIndexPath *)indexPath{
126
+    return @"删除";
127
+}
128
+
129
+
130
+-(void)didSelectItemByIndex:(NSInteger)index{
131
+    NSLog(@"didSelectItemByIndex--%@",@(index));
132
+}
133
+-(void)didSelectBtn{
134
+    NSLog(@"didSelectBtn");
135
+}
73 136
 
74 137
 
75 138
 
@@ -77,6 +140,7 @@ UITableViewDataSource
77 140
 - (UIImageView *)topImageView{
78 141
     if (!_topImageView) {
79 142
         _topImageView=[[UIImageView alloc]init];
143
+        
80 144
         [_topImageView setImage:[UIImage imageNamed:@"gs_home_top_img"]];
81 145
         
82 146
     }
@@ -85,7 +149,7 @@ UITableViewDataSource
85 149
 
86 150
 -(UITableView *)tableView{
87 151
     if (!_tableView) {
88
-        _tableView=[[UITableView alloc]init];
152
+        _tableView=[[UITableView alloc]initWithFrame:CGRectZero style:UITableViewStyleGrouped];
89 153
         _tableView.backgroundColor=[UIColor CHColorWithHex:0xF6F7F9];
90 154
         _tableView.delegate=self;
91 155
         _tableView.dataSource=self;
@@ -93,6 +157,8 @@ UITableViewDataSource
93 157
         _tableView.sectionFooterHeight = 0;
94 158
         _tableView.tableHeaderView=self.tableViewHeader;
95 159
         _tableView.showsVerticalScrollIndicator = NO;
160
+        _tableView.separatorStyle=UITableViewCellSeparatorStyleNone;
161
+        [_tableView registerNib:[UINib nibWithNibName:@"LVKBNewHomeTableViewCell" bundle:nil] forCellReuseIdentifier:@"cell"];
96 162
     }
97 163
     return _tableView;
98 164
 }
@@ -101,6 +167,10 @@ UITableViewDataSource
101 167
     if (!_centerView) {
102 168
         _centerView=[[UIImageView alloc]init];
103 169
         [_centerView setImage:[UIImage imageNamed:@"gs_home_top_day_background"]];
170
+        UILabel *label=[[UILabel alloc]init];
171
+        label.text=@"距离主卡还款日还有 天";
172
+        label.tag=1001;
173
+        [_centerView addSubview:label];
104 174
     }
105 175
     return _centerView;
106 176
 }
@@ -108,8 +178,31 @@ UITableViewDataSource
108 178
 -(LVKBNewHomeTableViewHeader *)tableViewHeader{
109 179
     if (!_tableViewHeader) {
110 180
         _tableViewHeader=[[LVKBNewHomeTableViewHeader alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 240)];
181
+        _tableViewHeader.delegate=self;
111 182
     }
112 183
     return _tableViewHeader;
113 184
 }
114 185
 
186
+-(NSMutableArray *)dataArray{
187
+    if (!_dataArray) {
188
+        _dataArray=[NSMutableArray array];
189
+        LVKBNewHomeModel *model=[[LVKBNewHomeModel alloc]init];
190
+        model.title=@"该还款了";
191
+        model.day=5;
192
+        model.hour=4;
193
+        model.second=22;
194
+        model.isOpen=NO;
195
+        [_dataArray addObject:model];
196
+    }
197
+    return _dataArray;
198
+}
199
+
200
+-(UIButton *)signInBtn{
201
+    if (!_signInBtn) {
202
+        _signInBtn=[UIButton buttonWithType:UIButtonTypeCustom];
203
+        [_signInBtn setImage:[UIImage imageNamed:@"gs_signIn"] forState:UIControlStateNormal];
204
+    }
205
+    return _signInBtn;
206
+}
207
+
115 208
 @end

+ 28 - 0
KXCardHelp/GS/NewHome/View/LVKBNewHomeTableViewCell.h

@@ -0,0 +1,28 @@
1
+//
2
+//  LVKBNewHomeTableViewCell.h
3
+//  KXCardHelp
4
+//
5
+//  Created by jcymac on 2018/9/20.
6
+//  Copyright © 2018年 jcymac. All rights reserved.
7
+//
8
+
9
+#import <UIKit/UIKit.h>
10
+
11
+#import "LVKBNewHomeModel.h"
12
+
13
+@protocol LVKBNewHomeTableViewCellDelegate <NSObject>
14
+
15
+-(void)switchActionByIndex:(NSInteger) index status:(BOOL) status;
16
+
17
+
18
+@end
19
+
20
+NS_ASSUME_NONNULL_BEGIN
21
+
22
+@interface LVKBNewHomeTableViewCell : UITableViewCell
23
+@property(nonatomic,strong)LVKBNewHomeModel *model;
24
+@property(nonatomic,weak  )id<LVKBNewHomeTableViewCellDelegate> delegate;
25
+
26
+@end
27
+
28
+NS_ASSUME_NONNULL_END

+ 54 - 0
KXCardHelp/GS/NewHome/View/LVKBNewHomeTableViewCell.m

@@ -0,0 +1,54 @@
1
+//
2
+//  LVKBNewHomeTableViewCell.m
3
+//  KXCardHelp
4
+//
5
+//  Created by jcymac on 2018/9/20.
6
+//  Copyright © 2018年 jcymac. All rights reserved.
7
+//
8
+
9
+#import "LVKBNewHomeTableViewCell.h"
10
+@interface LVKBNewHomeTableViewCell()
11
+@property (weak, nonatomic) IBOutlet UILabel *titleLabel;
12
+
13
+@property (weak, nonatomic) IBOutlet UILabel *dayLabel;
14
+
15
+@property (weak, nonatomic) IBOutlet UIButton *switchBtn;
16
+
17
+
18
+@end
19
+
20
+
21
+@implementation LVKBNewHomeTableViewCell
22
+
23
+- (void)awakeFromNib {
24
+    [super awakeFromNib];
25
+    self.selectionStyle=UITableViewCellSelectionStyleNone;
26
+    [self.switchBtn setImage:[UIImage imageNamed:@"gs_home_card_yes"] forState:UIControlStateSelected];
27
+    
28
+}
29
+
30
+
31
+- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
32
+    [super setSelected:selected animated:animated];
33
+    
34
+}
35
+
36
+-(void)setModel:(LVKBNewHomeModel *)model{
37
+    _model=model;
38
+    [self.switchBtn setSelected:model.isOpen];
39
+    self.titleLabel.text=model.title;
40
+    self.dayLabel.text=[NSString stringWithFormat:@"每月%li日 %li:%li",model.day,model.hour,model.second];
41
+   
42
+}
43
+
44
+
45
+- (IBAction)switchAction:(UIButton *)sender {
46
+    [sender setSelected:!sender.isSelected];
47
+    if (self.delegate && [self.delegate respondsToSelector:@selector(switchActionByIndex:status:)]) {
48
+        [self.delegate switchActionByIndex:self.model.index status:sender.isSelected];
49
+    }
50
+}
51
+
52
+
53
+
54
+@end

+ 83 - 0
KXCardHelp/GS/NewHome/View/LVKBNewHomeTableViewCell.xib

@@ -0,0 +1,83 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
3
+    <device id="retina4_7" orientation="portrait">
4
+        <adaptation id="fullscreen"/>
5
+    </device>
6
+    <dependencies>
7
+        <deployment identifier="iOS"/>
8
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
9
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
10
+    </dependencies>
11
+    <objects>
12
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
13
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
14
+        <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" id="KGk-i7-Jjw" customClass="LVKBNewHomeTableViewCell">
15
+            <rect key="frame" x="0.0" y="0.0" width="320" height="86"/>
16
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
17
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
18
+                <rect key="frame" x="0.0" y="0.0" width="320" height="85.5"/>
19
+                <autoresizingMask key="autoresizingMask"/>
20
+                <subviews>
21
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xXK-jm-S8b">
22
+                        <rect key="frame" x="0.0" y="6" width="320" height="79"/>
23
+                        <subviews>
24
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="该还款了" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="a9z-4e-a8E">
25
+                                <rect key="frame" x="14" y="18" width="65.5" height="19.5"/>
26
+                                <fontDescription key="fontDescription" type="system" pointSize="16"/>
27
+                                <color key="textColor" red="0.20000000000000001" green="0.20000000000000001" blue="0.20000000000000001" alpha="1" colorSpace="calibratedRGB"/>
28
+                                <nil key="highlightedColor"/>
29
+                            </label>
30
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="每月--日 -- : --" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7yf-3y-n7M">
31
+                                <rect key="frame" x="14" y="42.5" width="84.5" height="14.5"/>
32
+                                <fontDescription key="fontDescription" type="system" pointSize="12"/>
33
+                                <color key="textColor" red="0.40000000000000002" green="0.40000000000000002" blue="0.40000000000000002" alpha="1" colorSpace="calibratedRGB"/>
34
+                                <nil key="highlightedColor"/>
35
+                            </label>
36
+                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oLc-mo-Tv2">
37
+                                <rect key="frame" x="264" y="28.5" width="40" height="22"/>
38
+                                <constraints>
39
+                                    <constraint firstAttribute="height" constant="22" id="Lgc-YF-Fnt"/>
40
+                                    <constraint firstAttribute="width" constant="40" id="ti0-Uq-de2"/>
41
+                                </constraints>
42
+                                <state key="normal" title="Button" image="gs_home_card_no"/>
43
+                                <connections>
44
+                                    <action selector="switchAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="1Ik-ky-hKq"/>
45
+                                </connections>
46
+                            </button>
47
+                        </subviews>
48
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
49
+                        <constraints>
50
+                            <constraint firstAttribute="trailing" secondItem="oLc-mo-Tv2" secondAttribute="trailing" constant="16" id="EXW-Nd-Q5i"/>
51
+                            <constraint firstItem="oLc-mo-Tv2" firstAttribute="centerY" secondItem="xXK-jm-S8b" secondAttribute="centerY" id="OB8-O7-r4q"/>
52
+                            <constraint firstItem="a9z-4e-a8E" firstAttribute="top" secondItem="xXK-jm-S8b" secondAttribute="top" constant="18" id="PUP-XI-Fn3"/>
53
+                            <constraint firstItem="a9z-4e-a8E" firstAttribute="leading" secondItem="xXK-jm-S8b" secondAttribute="leading" constant="14" id="RsO-TJ-SIU"/>
54
+                            <constraint firstItem="7yf-3y-n7M" firstAttribute="leading" secondItem="xXK-jm-S8b" secondAttribute="leading" constant="14" id="ZD6-Yh-sKb"/>
55
+                            <constraint firstItem="7yf-3y-n7M" firstAttribute="top" secondItem="a9z-4e-a8E" secondAttribute="bottom" constant="5" id="nLC-4n-vHe"/>
56
+                        </constraints>
57
+                        <userDefinedRuntimeAttributes>
58
+                            <userDefinedRuntimeAttribute type="number" keyPath="layer.cornerRadius">
59
+                                <integer key="value" value="5"/>
60
+                            </userDefinedRuntimeAttribute>
61
+                        </userDefinedRuntimeAttributes>
62
+                    </view>
63
+                </subviews>
64
+                <color key="backgroundColor" red="0.96078431372549022" green="0.96078431372549022" blue="0.96078431372549022" alpha="1" colorSpace="calibratedRGB"/>
65
+                <constraints>
66
+                    <constraint firstAttribute="bottom" secondItem="xXK-jm-S8b" secondAttribute="bottom" constant="0.5" id="7jf-r7-27M"/>
67
+                    <constraint firstItem="xXK-jm-S8b" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="6" id="UuU-pb-soP"/>
68
+                    <constraint firstAttribute="trailing" secondItem="xXK-jm-S8b" secondAttribute="trailing" id="WdD-EE-knq"/>
69
+                    <constraint firstItem="xXK-jm-S8b" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="Y1p-2A-cae"/>
70
+                </constraints>
71
+            </tableViewCellContentView>
72
+            <connections>
73
+                <outlet property="dayLabel" destination="7yf-3y-n7M" id="kHT-ul-F71"/>
74
+                <outlet property="switchBtn" destination="oLc-mo-Tv2" id="ufF-r4-J8j"/>
75
+                <outlet property="titleLabel" destination="a9z-4e-a8E" id="niQ-Aj-u7O"/>
76
+            </connections>
77
+            <point key="canvasLocation" x="140.80000000000001" y="154.72263868065968"/>
78
+        </tableViewCell>
79
+    </objects>
80
+    <resources>
81
+        <image name="gs_home_card_no" width="40" height="22"/>
82
+    </resources>
83
+</document>

+ 9 - 1
KXCardHelp/GS/NewHome/View/LVKBNewHomeTableViewHeader.h

@@ -9,9 +9,17 @@
9 9
 #import <UIKit/UIKit.h>
10 10
 
11 11
 NS_ASSUME_NONNULL_BEGIN
12
+@protocol LVKBNewHomeTableViewHeaderDelegate <NSObject>
13
+
14
+-(void)didSelectItemByIndex:(NSInteger)index;
15
+-(void)didSelectBtn;
16
+
17
+
18
+@end
12 19
 
13
-@interface LVKBNewHomeTableViewHeader : UIView
14 20
 
21
+@interface LVKBNewHomeTableViewHeader : UIView
22
+@property(nonatomic,strong) id<LVKBNewHomeTableViewHeaderDelegate> delegate;
15 23
 @end
16 24
 
17 25
 NS_ASSUME_NONNULL_END

+ 69 - 7
KXCardHelp/GS/NewHome/View/LVKBNewHomeTableViewHeader.m

@@ -10,6 +10,7 @@
10 10
 @interface LVKBNewHomeTableViewHeader()
11 11
 @property(nonatomic,strong)NSArray *btnArray;
12 12
 @property(nonatomic,strong)UIButton *addCardAlertBtn;
13
+@property(nonatomic,strong)UIView   *centerView;
13 14
 
14 15
 @end
15 16
 @implementation LVKBNewHomeTableViewHeader
@@ -26,32 +27,93 @@
26 27
 
27 28
 -(void)initUI{
28 29
     [self addSubview:self.addCardAlertBtn];
29
-    
30
+    [self addSubview:self.centerView];
31
+    float leftWidth=FITSIZE(20);
32
+    float btnWidth=70;
33
+    float btnAndBtnWidth=(SCREEN_WIDTH-2*leftWidth-3*btnWidth)/2.0f;
34
+    for (int i=0; i<self.btnArray.count; i++) {
35
+        UIButton *btn=[UIButton buttonWithType:UIButtonTypeCustom];
36
+        btn.tag=1000+i;
37
+        [btn setTitle:self.btnArray[i][@"name"] forState:UIControlStateNormal];
38
+        btn.titleLabel.font=[UIFont systemFontOfSize:13];
39
+        [btn setTitleColor:[UIColor CHColorWithHex:0x666666] forState:UIControlStateNormal];
40
+        [btn setImage:[UIImage imageNamed:self.btnArray[i][@"img_name"]] forState:UIControlStateNormal];
41
+        btn.frame=CGRectMake(leftWidth+i*(btnWidth+btnAndBtnWidth), 0, btnWidth, btnWidth+25);
42
+        [btn setTitleEdgeInsets:UIEdgeInsetsMake(btn.imageView.height ,-btn.imageView.width, -20.0,0.0)];
43
+        [btn setImageEdgeInsets:UIEdgeInsetsMake(-20.0, 0.0,0.0, -btn.titleLabel.width)];
44
+        [btn addTarget:self action:@selector(btnAction:) forControlEvents:UIControlEventTouchUpInside];
45
+        [self.centerView addSubview:btn];
46
+    }
30 47
 }
31 48
 
32 49
 
50
+
51
+
52
+
53
+
33 54
 -(void)adjustUI{
34 55
     [self.addCardAlertBtn mas_makeConstraints:^(MASConstraintMaker *make) {
35
-        make.left.mas_equalTo(FITSIZE(14));
36
-        make.right.mas_equalTo((-FITSIZE(14)));
56
+        make.left.mas_equalTo(0);
57
+        make.right.mas_equalTo(0);
37 58
         make.height.mas_equalTo(50);
38
-        make.bottom.mas_equalTo(5);
59
+        make.bottom.mas_equalTo(-5);
39 60
     }];
61
+    [self.centerView mas_makeConstraints:^(MASConstraintMaker *make) {
62
+        make.left.right.mas_equalTo(0);
63
+        make.top.mas_equalTo(70);
64
+        make.height.mas_equalTo(100);
65
+        
66
+    }];
67
+    
68
+}
69
+
70
+-(void)btnAction:(UIButton *)sender{
71
+    if (self.delegate &&[self.delegate respondsToSelector:@selector(didSelectItemByIndex:)]) {
72
+        [self.delegate didSelectItemByIndex:sender.tag-1000];
73
+    }
40 74
 }
41 75
 
76
+
77
+
78
+
79
+-(UIView *)centerView{
80
+    if (!_centerView) {
81
+        _centerView=[[UIView alloc]init];
82
+    }
83
+    return _centerView;
84
+}
85
+
86
+
87
+
42 88
 -(UIButton *)addCardAlertBtn{
43 89
     if (!_addCardAlertBtn) {
44 90
         _addCardAlertBtn=[[UIButton alloc]init];
45 91
         [_addCardAlertBtn setTitle:@"+添加还款提醒" forState:UIControlStateNormal];
92
+        _addCardAlertBtn.layer.cornerRadius=8;
93
+        _addCardAlertBtn.layer.masksToBounds=YES;
94
+        [[_addCardAlertBtn rac_signalForControlEvents:UIControlEventTouchUpInside] subscribeNext:^(id x) {
95
+            if (self.delegate &&[self.delegate respondsToSelector:@selector(didSelectBtn)]) {
96
+                [self.delegate didSelectBtn];
97
+            }
98
+        }];
46 99
         CAGradientLayer *gradientLayer = [CAGradientLayer layer];
47
-        gradientLayer.frame = CGRectMake(0, 64, [UIScreen mainScreen].bounds.size.width, [UIScreen mainScreen].bounds.size.height-64);
48
-        gradientLayer.colors = @[(id)[UIColor redColor].CGColor,(id)[UIColor greenColor].CGColor,(id)[UIColor blueColor].CGColor];
100
+        gradientLayer.frame = CGRectMake(0, 0   , SCREEN_WIDTH-2*FITSIZE(14), 50);
101
+        gradientLayer.colors = @[(id)[UIColor CHColorWithHex:0xd7b6fc].CGColor,(id)[UIColor CHColorWithHex:0x8e80f9].CGColor];
49 102
         gradientLayer.startPoint = CGPointMake(0, 0);
50
-        gradientLayer.endPoint = CGPointMake(1, 0);
103
+        gradientLayer.endPoint = CGPointMake( 0,1);
51 104
         [_addCardAlertBtn.layer addSublayer:gradientLayer];
52 105
     }
53 106
     return _addCardAlertBtn;
54 107
     
55 108
 }
56 109
 
110
+-(NSArray *)btnArray{
111
+    if (!_btnArray) {
112
+        _btnArray=@[@{@"name":@"添加信用卡",@"img_name":@"gs_center_addCard"},
113
+                    @{@"name":@"卡片管理",@"img_name":@"gs_center_cardManage"},
114
+                    @{@"name":@"还款记录",@"img_name":@"gs_center__moneyAnalysis"}];
115
+    }
116
+    return _btnArray;
117
+}
118
+
57 119
 @end

+ 17 - 0
KXCardHelp/GS/NewHome/View/LVKBNewSignInView.h

@@ -0,0 +1,17 @@
1
+//
2
+//  LVKBNewSignInView.h
3
+//  KXCardHelp
4
+//
5
+//  Created by jcymac on 2018/9/20.
6
+//  Copyright © 2018年 jcymac. All rights reserved.
7
+//
8
+
9
+#import <UIKit/UIKit.h>
10
+
11
+NS_ASSUME_NONNULL_BEGIN
12
+
13
+@interface LVKBNewSignInView : UIView
14
+
15
+@end
16
+
17
+NS_ASSUME_NONNULL_END

+ 21 - 0
KXCardHelp/GS/NewHome/View/LVKBNewSignInView.m

@@ -0,0 +1,21 @@
1
+//
2
+//  LVKBNewSignInView.m
3
+//  KXCardHelp
4
+//
5
+//  Created by jcymac on 2018/9/20.
6
+//  Copyright © 2018年 jcymac. All rights reserved.
7
+//
8
+
9
+#import "LVKBNewSignInView.h"
10
+
11
+@implementation LVKBNewSignInView
12
+
13
+/*
14
+// Only override drawRect: if you perform custom drawing.
15
+// An empty implementation adversely affects performance during animation.
16
+- (void)drawRect:(CGRect)rect {
17
+    // Drawing code
18
+}
19
+*/
20
+
21
+@end

+ 45 - 0
KXCardHelp/GS/NewHome/View/LVKBNewSignInView.xib

@@ -0,0 +1,45 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
3
+    <device id="retina4_7" orientation="portrait">
4
+        <adaptation id="fullscreen"/>
5
+    </device>
6
+    <dependencies>
7
+        <deployment identifier="iOS"/>
8
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14283.14"/>
9
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
10
+    </dependencies>
11
+    <objects>
12
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
13
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
14
+        <view contentMode="scaleToFill" id="iN0-l3-epB">
15
+            <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
16
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
17
+            <subviews>
18
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="pRs-tL-PYs">
19
+                    <rect key="frame" x="49.5" y="247" width="276" height="173"/>
20
+                    <subviews>
21
+                        <imageView userInteractionEnabled="NO" contentMode="scaleToFill" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="jvw-eA-Bzj">
22
+                            <rect key="frame" x="47.5" y="-108" width="181" height="140"/>
23
+                            <constraints>
24
+                                <constraint firstAttribute="height" constant="140" id="ZHL-aV-BIb"/>
25
+                                <constraint firstAttribute="width" constant="181" id="yCr-tX-LGV"/>
26
+                            </constraints>
27
+                        </imageView>
28
+                    </subviews>
29
+                    <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
30
+                    <constraints>
31
+                        <constraint firstItem="jvw-eA-Bzj" firstAttribute="centerX" secondItem="pRs-tL-PYs" secondAttribute="centerX" id="4oG-3N-hbs"/>
32
+                        <constraint firstAttribute="height" constant="173" id="V8a-7h-JkZ"/>
33
+                        <constraint firstItem="jvw-eA-Bzj" firstAttribute="top" secondItem="pRs-tL-PYs" secondAttribute="top" constant="-108" id="WBf-9W-1ea"/>
34
+                        <constraint firstAttribute="width" constant="276" id="h3W-8U-RMt"/>
35
+                    </constraints>
36
+                </view>
37
+            </subviews>
38
+            <color key="backgroundColor" white="0.66666666666666663" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
39
+            <constraints>
40
+                <constraint firstItem="pRs-tL-PYs" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="Nsy-Se-MXi"/>
41
+                <constraint firstItem="pRs-tL-PYs" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="QkI-DF-HME"/>
42
+            </constraints>
43
+        </view>
44
+    </objects>
45
+</document>