Skip to content

Commit 924280f

Browse files
committed
Baner 微调
1 parent 155fe55 commit 924280f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Coding_iOS/Views/CodingBannersView.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,16 @@ - (void)setCurBannerList:(NSArray *)curBannerList{
9090
AutoSlideScrollView *slideView = [[AutoSlideScrollView alloc] initWithFrame:CGRectMake(kPaddingLeftWidth, _padding_top, _image_width, _image_width * _ratio) animationDuration:5.0];
9191
slideView.layer.cornerRadius = 2.0;
9292
slideView.layer.masksToBounds = YES;
93+
slideView.scrollView.scrollsToTop = NO;
9394

9495
slideView.totalPagesCount = ^NSInteger(){
9596
return weakSelf.curBannerList.count;
9697
};
9798
slideView.fetchContentViewAtIndex = ^UIView *(NSInteger pageIndex){
9899
if (weakSelf.curBannerList.count > pageIndex) {
99100
UIImageView *imageView = [weakSelf p_reuseViewForIndex:pageIndex];
100-
imageView.backgroundColor = [UIColor randomColor];
101101
CodingBanner *curBanner = weakSelf.curBannerList[pageIndex];
102-
[imageView sd_setImageWithURL:[curBanner.image urlWithCodePath] placeholderImage:[UIImage imageNamed:@"placeholder_coding_square_150"]];
102+
[imageView sd_setImageWithURL:[curBanner.image urlWithCodePath]];
103103
return imageView;
104104
}else{
105105
return [UIView new];
@@ -133,6 +133,7 @@ - (UIImageView *)p_reuseViewForIndex:(NSInteger)pageIndex{
133133
_imageViewList = [[NSMutableArray alloc] initWithCapacity:3];
134134
for (int i = 0; i < 3; i++) {
135135
UIImageView *view = [[UIImageView alloc] initWithFrame:CGRectMake(kPaddingLeftWidth, _padding_top, _image_width, _image_width * _ratio)];
136+
view.backgroundColor = [UIColor colorWithHexString:@"0xe5e5e5"];
136137
view.clipsToBounds = YES;
137138
view.contentMode = UIViewContentModeScaleAspectFill;
138139
[_imageViewList addObject:view];

0 commit comments

Comments
 (0)