欢迎光临
我们一直在努力

uicollectionviewflowlayout布局2

建站超值云服务器,限时71元/月

uicollectionviewflowlayout布局2

项目介绍:

使用 UIcollectionviewflowlayout 实现了婴儿记录成长故事记录的滑杆。
随着时间的推移,记录了婴儿的成长历程。

实现代码:
[Objective-C] 查看源文件 复制代码

#import "ViewController.h"
#import "XKCircleMacros.h"
#import "XKPERulerView.h"
#import "XKPEBabyTargetDrawView.h"
#import "XKPEBabySliderView.h"
#import "XKPEBabyScsViewController.h"
@interface ViewController ()<ZXPushVCDelegate>
@property (nonatomic ,strong)XKPEBabyTargetDrawView *drawView;
@property (nonatomic ,strong)XKPERulerView *rulerView;
@property (nonatomic ,strong) XKPEBabySliderView *productSlider;
@end

@implementation ViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    
    self.navigationController.navigationBar.hidden = YES;
    _drawView = [[XKPEBabyTargetDrawView  alloc]initWithFrame:CGRectMake(0,0,  XKUIScreenwidth,  XKUIScreenheight)];
    self.view.backgroundColor =[UIColor colorWithRed:32/255.0 green:180/255.0 blue:230/255.0 alpha:1.0];
    
//    [self.view addSubview:_drawView];

  _productSlider  = [[XKPEBabySliderView alloc]initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, 385)
                                                                    Title:@""
                                                                 MinValue:0
                                                                 MaxValue:320
                                                                     Step:1
                                                                     Unit:@"个月"
   
                                          
                                                                     HasDeleteBtn:NO];
    
    _productSlider.delegateOne =self;

    
    [self.view addSubview:_productSlider];
    
    
    // Do any additional setup after loading the view, typically from a nib.
}


-(void)PushVC:(UIButton *)sender{
    
    XKPEBabyScsViewController *babyScesVC = [[XKPEBabyScsViewController alloc]init];
    
    babyScesVC.btnTag = [NSString stringWithFormat:@"%ld",(long)sender.tag];
    NSInteger tag = sender.tag;
    if (self.block) {
        self.block(tag);
    }
    
    NSLog(@"!!!!!!%ld",(long)sender.tag);
    [self.navigationController pushViewController:babyScesVC animated:YES];
    
}

- (void)returnTag:(RetrunImg)block{
    self.block = block;
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

@end

赞(0)
版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com 特别注意:本站所有转载文章言论不代表本站观点! 本站所提供的图片等素材,版权归原作者所有,如需使用,请与原作者联系。未经允许不得转载:IDC资讯中心 » uicollectionviewflowlayout布局2
分享到: 更多 (0)