当前位置: 首页 > news >正文

做企业网站需要准备什么行业门户网站建设费用

做企业网站需要准备什么,行业门户网站建设费用,一建报名时间2022年,黄骅贴吧二手房买卖UI效果 实现的思路 就是通过贝塞尔曲线画出时间轴的圆环的路径#xff0c;然后 使用CAShaper来渲染UI#xff0c;再通过 animation.beginTime [cilrclLayer convertTime:CACurrentMediaTime() fromLayer:nil] circleTimeOffset 来设置每个圆环的动画开始时间#xff0c; …UI效果 实现的思路 就是通过贝塞尔曲线画出时间轴的圆环的路径然后 使用CAShaper来渲染UI再通过 animation.beginTime [cilrclLayer convertTime:CACurrentMediaTime() fromLayer:nil] circleTimeOffset 来设置每个圆环的动画开始时间 每个地方都是有两层layer的一层是底部灰色样式的即没有到达时候的颜色一层是到达得阶段的颜色 到达的layer在上面如果要开启动画我们就得先将 到达的layer隐藏掉然后开始动画的时候将对应的那一条展示开启动画的时候将hidden置为NO这时候其实layer是展示不了的不会整个展示因为我们添加了strokeEnd的动画他会随者动画的进行而逐渐展示所以我们在动画代理方法animationDidStart中将layer 设置为可见如果没有设置动画代理也可以在添加动画的时候设置为可见 代码 // // LBTimeView.m // LBTimeLine // // Created by mac on 2024/6/9. //#import LBTimeView.h #define ScreenWidth [UIScreen mainScreen].bounds.size.width #define RGB(r, g, b) [UIColor colorWithRed:(r)/255.f green:(g)/255.f blue:(b)/255.f alpha:1.f] #define SizeScale (([UIScreen mainScreen].bounds.size.width 320) ? [UIScreen mainScreen].bounds.size.width/320 : 1)const float BETTWEEN_LABEL_OFFSET 20; const float LINE_WIDTH 1.9; const float CIRCLE_RADIUS 3.7; const float INITIAL_PROGRESS_CONTAINER_WIDTH 20.0; const float PROGRESS_VIEW_CONTAINER_LEFT 51.0; const float VIEW_WIDTH 225.0;interface LBTimeView () {CGPoint lastpoint;NSMutableArray *layers;NSMutableArray *circleLayers;int layerCounter;int circleCounter;CGFloat timeOffset;CGFloat leftWidth;CGFloat rightWidth;CGFloat viewWidth; }endimplementation LBTimeView-(id)initWithFrame:(CGRect)frame sum:(NSInteger)sum current:(NSInteger)current{self [super initWithFrame:frame];if (self) {self.frame frame;[self configureTimeLineWithNum:sum andCurrentNum:current];}return self;// Do any additional setup after loading the view, typically from a nib. }- (void)configureTimeLineWithNum:(NSInteger)sum andCurrentNum:(NSInteger)currentStatus {// NSInteger currentStatus 3;circleLayers [[NSMutableArray alloc] init];layers [[NSMutableArray alloc] init];CGFloat U (ScreenWidth - 80- sum1)/(sum - 1);CGFloat betweenLineOffset 0;//CGFloat totlaHeight 8;// CGFloat yCenter - 48 (ScreenWidth - 248)/2;CGFloat yCenter 40;// CGFloat xCenter;UIColor *strokeColor;CGPoint toPoint;CGPoint fromPoint;int i 0;for (int j 0;j sum;j ) {//configure circlestrokeColor i currentStatus ? RGB(224, 0, 30) : RGB(233, 233, 233);UIBezierPath *circle [UIBezierPath bezierPath];[self configureBezierCircle:circle withCenterY:yCenter];CAShapeLayer *circleLayer [self getLayerWithCircle:circle andStrokeColor:strokeColor];//[circleLayers addObject:circleLayer];//add static background gray circleCAShapeLayer *grayStaticCircleLayer [self getLayerWithCircle:circle andStrokeColor:RGB(233, 233, 233)];[self.layer addSublayer:grayStaticCircleLayer];[self.layer addSublayer:circleLayer];//configure lineif (i 0) {fromPoint lastpoint;toPoint CGPointMake(yCenter - CIRCLE_RADIUS,60*SizeScale);lastpoint CGPointMake( yCenter CIRCLE_RADIUS 1,60*SizeScale);UIBezierPath *line [self getLineWithStartPoint:fromPoint endPoint:toPoint];CAShapeLayer *lineLayer [self getLayerWithLine:line andStrokeColor:strokeColor];// CAShapeLayer *lineLayer2 [self getLayerWithLine:line andStrokeColor:strokeColor];[layers addObject:lineLayer];//add static background gray lineCAShapeLayer *grayStaticLineLayer [self getLayerWithLine:line andStrokeColor:RGB(233, 233, 233)];[self.layer addSublayer:grayStaticLineLayer];[self.layer addSublayer:lineLayer];} else {lastpoint CGPointMake( yCenter CIRCLE_RADIUS1,60*SizeScale);}betweenLineOffset BETTWEEN_LABEL_OFFSET;yCenter U;i;} }- (CAShapeLayer *)getLayerWithLine:(UIBezierPath *)line andStrokeColor:(UIColor *)strokeColor {CAShapeLayer *lineLayer [CAShapeLayer layer];lineLayer.path line.CGPath;lineLayer.strokeColor strokeColor.CGColor;lineLayer.fillColor nil;lineLayer.lineWidth 1.4;return lineLayer; }- (UIBezierPath *)getLineWithStartPoint:(CGPoint)start endPoint:(CGPoint)end {UIBezierPath *line [UIBezierPath bezierPath];[line moveToPoint:start];[line addLineToPoint:end];return line; }- (CAShapeLayer *)getLayerWithCircle:(UIBezierPath *)circle andStrokeColor:(UIColor *)strokeColor {CAShapeLayer *circleLayer [CAShapeLayer layer];circleLayer.path circle.CGPath;circleLayer.strokeColor strokeColor.CGColor;circleLayer.fillColor nil;circleLayer.lineWidth LINE_WIDTH;circleLayer.lineJoin kCALineJoinBevel;return circleLayer; }- (void)configureBezierCircle:(UIBezierPath *)circle withCenterY:(CGFloat)centerY {[circle addArcWithCenter:CGPointMake( centerY,60*SizeScale)radius:CIRCLE_RADIUSstartAngle:M_PI_2endAngle:-M_PI_2clockwise:YES];[circle addArcWithCenter:CGPointMake(centerY,60*SizeScale)radius:CIRCLE_RADIUSstartAngle:-M_PI_2endAngle:M_PI_2clockwise:YES]; }- (void)startAnimatingWithCurrentIndex:(NSInteger)index {for (CAShapeLayer *layer in layers) {layer.hidden YES;}[self startAnimatingLayers:circleLayers forStatus:index]; }- (void)startAnimatingLayers:(NSArray *)layersToAnimate forStatus:(NSInteger)currentStatus {float circleTimeOffset 1;circleCounter 0;int i 1;//add with animationfor (CAShapeLayer *cilrclLayer in layersToAnimate) {[self.layer addSublayer:cilrclLayer];CABasicAnimation *animation [CABasicAnimation animationWithKeyPath:strokeEnd];animation.duration 0.2;animation.beginTime [cilrclLayer convertTime:CACurrentMediaTime() fromLayer:nil] circleTimeOffset;animation.fromValue [NSNumber numberWithFloat:0.0f];animation.toValue [NSNumber numberWithFloat:1.0f];animation.fillMode kCAFillModeForwards;animation.delegate (id CAAnimationDelegate) self;circleTimeOffset .4;[cilrclLayer setHidden:YES];[cilrclLayer addAnimation:animation forKey:strokeCircleAnimation];if (self.lastBlink i currentStatus i ! [layersToAnimate count]) {CABasicAnimation *strokeAnim [CABasicAnimation animationWithKeyPath:strokeColor];strokeAnim.fromValue (id) [UIColor orangeColor].CGColor;strokeAnim.toValue (id) [UIColor clearColor].CGColor;strokeAnim.duration 1.0;strokeAnim.repeatCount HUGE_VAL;strokeAnim.autoreverses NO;[cilrclLayer addAnimation:strokeAnim forKey:animateStrokeColor];}i;} }- (void)animationDidStart:(CAAnimation *)anim {if (circleCounter circleLayers.count) {if (anim [circleLayers[circleCounter] animationForKey:strokeCircleAnimation]) {[circleLayers[circleCounter] setHidden:NO];circleCounter;}} }- (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag {if (layerCounter layers.count) {return;}CAShapeLayer *lineLayer layers[layerCounter];CABasicAnimation *animation [CABasicAnimation animationWithKeyPath:strokeEnd];animation.duration 0.200;animation.fromValue [NSNumber numberWithFloat:0.0f];animation.toValue [NSNumber numberWithFloat:1.0f];animation.fillMode kCAFillModeForwards;lineLayer.hidden NO;[self.layer addSublayer:lineLayer];[lineLayer addAnimation:animation forKey:strokeEndAnimation];layerCounter; }end 如果对您有帮助欢迎给一个star demo
http://www.dnsts.com.cn/news/198980.html

相关文章:

  • 做免费嗳暧视频网站网站子站怎么建设
  • 安庆做网站网站代理中国商标注册网官方网站
  • 建设网站的时候长岛网站建设
  • 域名注册网站 简称怎么创建网站平台
  • 四川省城乡住房建设部网站首页google seo 优化
  • 家具网站建设wordpress文章模版
  • 17.zwd一起做网站不死鸟分享友情链接
  • 郑州网站推广电话保定建设工程信息网站
  • 网站建设的可行性分析平台开发是做什么的
  • 深圳商业网站建设怎么样网站开发背景400字
  • wordpress文章模块化插件手机网站seo软件
  • 湖南广源建设工程有限公司网站ui是什么设计
  • 廉溪区建设局网站更换网站需要备案吗
  • 莆田seo建站网站怎样做微信公众号
  • 沧州网站seo交易链接大全
  • 网站做分屏好不好ucenter wordpress
  • 做充币提现的网站自己建设网站
  • 郑州优化网站公司seo网站排名优化服务
  • 手机高端网站开发单位网站改版
  • 百度 站长工具公司简介电子版宣传册模板
  • phpcms旅游网站模板长沙岳麓区房价
  • 深圳品牌建网站营销推广案例
  • 模板建站费用南通网站建设.
  • 公众号自己做电影网站什么是电子商务?
  • a站怎么进西安维护网站
  • 制作一般网站wordpress资料图片
  • 这样做自己的网站西安网站创建
  • 编译django做的网站可视化数据平台
  • 高端大气网站鹤壁seo推广
  • 个人博客网站建设怎样建设旅游网站