|
@@ -42,7 +42,7 @@ static NSString *cellID = @"cellID";
|
42
|
42
|
|
43
|
43
|
- (UIView *)headerView {
|
44
|
44
|
if (!_headerView) {
|
45
|
|
- _headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 200)];
|
|
45
|
+ _headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH, 180)];
|
46
|
46
|
|
47
|
47
|
UIColor *topColor = WWColor(219, 141, 255, 1);
|
48
|
48
|
UIColor *bottomColor = WWColor(233, 202, 248, 1);
|
|
@@ -50,8 +50,8 @@ static NSString *cellID = @"cellID";
|
50
|
50
|
[_headerView setBackgroundColor:[UIColor colorWithPatternImage:bgImg]];
|
51
|
51
|
|
52
|
52
|
//图片
|
53
|
|
- UIImageView *topImg = [[UIImageView alloc] initWithFrame:CGRectMake(13, 15, SCREEN_WIDTH-26, 170)];
|
54
|
|
- topImg.image = [UIImage imageNamed:@"sellBanner"];
|
|
53
|
+ UIImageView *topImg = [[UIImageView alloc] initWithFrame:CGRectMake(13, 15, SCREEN_WIDTH-26, 150)];
|
|
54
|
+ topImg.image = [UIImage imageNamed:@"icon_check_ home_banner"];
|
55
|
55
|
topImg.layer.masksToBounds = YES;
|
56
|
56
|
topImg.layer.cornerRadius = 10.0;
|
57
|
57
|
[_headerView addSubview:topImg];
|
|
@@ -78,7 +78,7 @@ static NSString *cellID = @"cellID";
|
78
|
78
|
|
79
|
79
|
//质检标准(图片)
|
80
|
80
|
UIImageView *bottomImg = [[UIImageView alloc] initWithFrame:CGRectMake(13, 250, SCREEN_WIDTH-26, 120)];
|
81
|
|
- bottomImg.image = [UIImage imageNamed:@"sellBanner"];
|
|
81
|
+ bottomImg.image = [UIImage imageNamed:@"icon_check_ home_quality"];
|
82
|
82
|
bottomImg.layer.masksToBounds = YES;
|
83
|
83
|
bottomImg.layer.cornerRadius = 10.0;
|
84
|
84
|
bottomImg.userInteractionEnabled = YES;
|
|
@@ -119,25 +119,28 @@ static NSString *cellID = @"cellID";
|
119
|
119
|
- (void)viewDidLoad {
|
120
|
120
|
[super viewDidLoad];
|
121
|
121
|
// Do any additional setup after loading the view.
|
122
|
|
-
|
123
|
122
|
[self createNaviBar];
|
124
|
123
|
[self.view addSubview:self.tableView];
|
125
|
124
|
}
|
126
|
125
|
|
|
126
|
+- (void)viewWillAppear:(BOOL)animated {
|
|
127
|
+ [super viewWillAppear:animated];
|
|
128
|
+
|
|
129
|
+ self.navigationController.navigationBar.barTintColor = WWColor(219, 141, 255, 1);
|
|
130
|
+}
|
|
131
|
+
|
127
|
132
|
#pragma mark - 创建导航栏
|
128
|
133
|
- (void)createNaviBar {
|
129
|
134
|
NSString *appName = [NSString getAppName];
|
130
|
135
|
self.name = appName;
|
131
|
136
|
|
132
|
|
-// for (UIView *views in self.navigationController.navigationBar.subviews) {
|
133
|
|
-// for (UIView *view in views.subviews) {
|
134
|
|
-// if ([view isKindOfClass:[UIImageView class]]) {
|
135
|
|
-// view.hidden = YES;
|
136
|
|
-// }
|
137
|
|
-// }
|
138
|
|
-// }
|
139
|
|
-
|
140
|
|
- self.navigationController.navigationBar.barTintColor = WWColor(219, 141, 255, 1);
|
|
137
|
+ for (UIView *views in self.navigationController.navigationBar.subviews) {
|
|
138
|
+ for (UIView *view in views.subviews) {
|
|
139
|
+ if ([view isKindOfClass:[UIImageView class]]) {
|
|
140
|
+ view.hidden = YES;
|
|
141
|
+ }
|
|
142
|
+ }
|
|
143
|
+ }
|
141
|
144
|
}
|
142
|
145
|
|
143
|
146
|
#pragma mark - tableView dataSource
|
|
@@ -158,7 +161,7 @@ static NSString *cellID = @"cellID";
|
158
|
161
|
cell.indexPath = indexPath;
|
159
|
162
|
if (indexPath.row == 0) {
|
160
|
163
|
UIColor *topColor = WWColor(233, 202, 248, 1);
|
161
|
|
- UIColor *bottomColor = WWColor(245, 245, 245, 1);
|
|
164
|
+ UIColor *bottomColor = [UIColor groupTableViewBackgroundColor];
|
162
|
165
|
UIImage *bgImg = [UIImage gradientColorImageFromColors:@[topColor, bottomColor] gradientType:GradientTypeTopToBottom imgSize:CGSizeMake(SCREEN_WIDTH, 190)];
|
163
|
166
|
[cell.contentView setBackgroundColor:[UIColor colorWithPatternImage:bgImg]];
|
164
|
167
|
}
|
|
@@ -167,6 +170,15 @@ static NSString *cellID = @"cellID";
|
167
|
170
|
return cell;
|
168
|
171
|
}
|
169
|
172
|
|
|
173
|
+- (void)scrollViewDidScroll:(UIScrollView *)scrollView {
|
|
174
|
+ if (scrollView == self.tableView) {
|
|
175
|
+ CGFloat offY = scrollView.contentOffset.y;
|
|
176
|
+ if (offY < 0) {
|
|
177
|
+ scrollView.contentOffset = CGPointZero;
|
|
178
|
+ }
|
|
179
|
+ }
|
|
180
|
+}
|
|
181
|
+
|
170
|
182
|
#pragma mark - 点击最底部质检标准图片
|
171
|
183
|
- (void)onClickBottomImage {
|
172
|
184
|
KXSPWebViewController *web = [[KXSPWebViewController alloc] init];
|