iOS14 SDCycleScrollView适配UIControl

全局搜索self.pageControl.frame= pageControlFrame

if(@available(iOS14.0, *)) {

        self.pageControl.translatesAutoresizingMaskIntoConstraints = NO;

        [[self.pageControl.centerXAnchor constraintEqualToAnchor:self.centerXAnchor] setActive:YES];

        [[self.pageControl.bottomAnchor constraintEqualToAnchor:self.bottomAnchor constant:-10] setActive:YES];

        [[self.pageControl.heightAnchor constraintEqualToConstant:self.pageControlDotSize.height] setActive:YES];

    }else{

        CGRectpageControlFrame =CGRectMake(x, y, size.width, size.height);

        pageControlFrame.origin.y-=self.pageControlBottomOffset;

        pageControlFrame.origin.x-=self.pageControlRightOffset;

        self.pageControl.frame= pageControlFrame;

    }

你可能感兴趣的:(iOS14 SDCycleScrollView适配UIControl)