| 1234567891011121314151617181920212223242526272829303132333435363738 |
- //
- // CTPageControl.m
- // AICity
- //
- // Created by 刘伟伟 on 2023/7/6.
- // Copyright © 2023 wei.z. All rights reserved.
- //
- #import "CTPageControl.h"
- @implementation CTPageControl
- //- (void)setCurrentPage:(NSInteger)page {
- // [super setCurrentPage:page];
- // for (NSUInteger subviewIndex = 0; subviewIndex < [self.subviews count]; subviewIndex++) {
- // UIView *subview = [self.subviews objectAtIndex:subviewIndex];
- // UIImageView *imageView = nil;
- // if (subviewIndex == page) {
- // CGFloat w = 6;
- // CGFloat h = 6;
- // imageView = [[UIImageView alloc] initWithFrame:CGRectMake(-1.5, -1.5, w, h)];
- // imageView.image = [UIImage imageNamed:@"Ellipse 2"];
- // [subview setFrame:CGRectMake(subview.frame.origin.x, subview.frame.origin.y, w, h)];
- // } else {
- // CGFloat w = 4;
- // CGFloat h = 4;
- // imageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, w, h)];
- // imageView.image = [UIImage imageNamed:@"Ellipse 3"];
- // [subview setFrame:CGRectMake(subview.frame.origin.x, subview.frame.origin.y, w, h)];
- // }
- // imageView.tag = 10010;
- // UIImageView *lastImageView = (UIImageView *) [subview viewWithTag:10010];
- // [lastImageView removeFromSuperview]; //把上一次添加的view移除
- // [subview addSubview:imageView];
- // }
- //}
- @end
|