// // JXVipDetailCenterView.m // shiku_im // // Created by cindy on 2020/6/3. // Copyright © 2020 Reese. All rights reserved. // #import "JXVipDetailCenterView.h" #import "XFStepView.h" #import "JXMyModel.h" #import "Common.h" @interface JXVipDetailCenterView () @end @implementation JXVipDetailCenterView - (instancetype)initWithFrame:(CGRect)frame Titles:(nonnull NSArray *)titles{ if ([super initWithFrame:frame]){ if (self) { self.clipsToBounds = NO; [self _addSubViews:titles]; } } return self; } - (void)_addSubViews:(NSArray *)array { //等级ScrollView self.grapeScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 0, kScreenWidth, 40)]; self.grapeScrollView.contentSize = CGSizeMake(100*array.count, 40); self.grapeScrollView.bounces = NO; [self addSubview:self.grapeScrollView]; //等级UI self.stepView = [[XFStepView alloc]initWithFrame:CGRectMake(0, 0, 100*array.count, 40) Titles:array]; [self.grapeScrollView addSubview:self.stepView]; self.pictureScrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(50, self.grapeScrollView.bottom+10, kScreenWidth-100, 120)]; self.pictureScrollView.delegate = self; self.pictureScrollView.clipsToBounds = NO; self.pictureScrollView.clipsToBounds = NO; self.pictureScrollView.pagingEnabled = YES; self.pictureScrollView.bounces = NO; self.pictureScrollView.showsHorizontalScrollIndicator = NO; self.pictureScrollView.contentSize = CGSizeMake(self.pictureScrollView.frame.size.width*array.count, 120); [self addSubview:self.pictureScrollView]; //创建图片 for(int i = 0; i