Great oaks from little acorns grow. Today is the NTH +3 day of building UDKit.

Although the system provides a lot of basic controls, but this is not enough for our daily development needs. Today is a wrapper for UIScrollView.

The following requirements are sometimes encountered:

It may seem like nothing, there are many implementations, but products tend to think otherwise.

Here’s what he wants:

Programmer: Well, that’s a bit of a dilemma. Is it a headache? It doesn’t matter, our UDCycleView has already done that for us.

1: common banner

You can choose whether to configure UDPageControl, the page indicator. If not, use the default

    UDPageControl *pageC = [[UDPageControl alloc] initWithFrame:CGRectMake(0, 200-30, self.view.bounds.size.width, 30)];
    pageC.selectColor = [UIColor redColor];
    pageC.normalColor = [UIColor yellowColor];
    
    UDCycleView * cycleViewTwo = [[UDCycleView alloc] initWithFrame:CGRectMake(0, 400, self.view.bounds.size.width, 200) pageControl:pageC];
    cycleViewTwo.delegate = self;
    cycleViewTwo.autoScroll = YES;
    cycleViewTwo.timeInterval = 2;
    cycleViewTwo.placeholderImage = [UIImage imageNamed:@"default_img.jpeg"];
    cycleViewTwo.imagesArray = imagesArray;
    [self.view addSubview:cycleViewTwo];
Copy the code

2: special banner

UDCycleView * cycleView = [[UDCycleView alloc] initWithFrame:CGRectMake(0, 100, self.view.bounds.size.width, 200)]; cycleView.space = 10; Cycleview. timeInterval = 2; cycleView.imagesArray = imagesArray; cycleView.autoScroll = YES; cycleView.placeholderImage = [UIImage imageNamed:@"default_img.jpeg"];
    cycleView.delegate = self;
    [self.view addSubview:cycleView];
Copy the code

Pod integration is available, and more fun effects are coming, so stay tuned.

pod 'UDCycleView'

Lot code

Welcome to exchange. Like friends star once.