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

如何在工商局网站上做网登常州百度关键词优化

如何在工商局网站上做网登,常州百度关键词优化,环保类网站建设,企业网站建设在国内现状效果图 该跑马灯完全通过CATextLayer 实现,轻量级,并且通过 系统的位移动画实现滚动效果,避免了使用displaylink造成的性能瓶颈,使用系统动画,系统自动做了很多性能优化,实现更好的性能,并使用…

效果图
请添加图片描述

该跑马灯完全通过CATextLayer 实现,轻量级,并且通过
系统的位移动画实现滚动效果,避免了使用displaylink造成的性能瓶颈,使用系统动画,系统自动做了很多性能优化,实现更好的性能,并使用遮罩实现展示范围的限定
,实现跑马灯效果

//
//  LBMarqueeLayer.m
//  TEXT
//
//  Created by mac on 2024/4/28.
//  Copyright © 2024 刘博. All rights reserved.
//#import "LBMarqueeLayer.h"@implementation LBMarqueeLayerConfig- (instancetype)init
{self = [super init];if (self) {self.velocity = 20;self.fontSize = 14;self.textColor = [UIColor darkGrayColor];self.pauseDuration = 3;self.blankString = @"  ";}return self;
}@end@interface LBMarqueeLayer () <CAAnimationDelegate>@property (nonatomic, strong) CATextLayer *textLayer;@property (nonatomic, strong) CALayer *maskLayer;@property (nonatomic, strong) LBMarqueeLayerConfig *config;@property (nonatomic, strong) CABasicAnimation *animation;@end@implementation LBMarqueeLayer- (instancetype)initwithFrame:(CGRect)frameconfig:(LBMarqueeLayerConfig *)config
{if ([super init]) {self.frame = frame;self.config = config;[self handleText];[self addSublayer:self.textLayer];}return self;
}- (void)handleText
{CGFloat width = [self.config.text sizeWithAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:self.config.fontSize]}].width;if (width > CGRectGetWidth(self.bounds)) {NSString *content = [NSString stringWithFormat:@"%@%@%@", self.config.text, self.config.blankString, self.config.text];NSAttributedString *attributedString = [[NSAttributedString alloc] initWithString:content attributes:@{NSFontAttributeName:[UIFont systemFontOfSize:self.config.fontSize]}];self.textLayer.string = attributedString;CGFloat width = [content sizeWithAttributes:@{NSFontAttributeName: [UIFont systemFontOfSize:self.config.fontSize]}].width;self.textLayer.frame = CGRectMake(0, 0, width, CGRectGetHeight(self.bounds));CGFloat toValue = [[NSString stringWithFormat:@"%@%@", self.config.text, self.config.blankString] sizeWithAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:self.config.fontSize]}].width;self.animation.fromValue = @(0);self.animation.toValue = @(-toValue);self.animation.duration = toValue/self.config.velocity;[self.textLayer addAnimation:self.animation forKey:@"animation"];self.masksToBounds = YES;} else {self.textLayer.string = self.config.text;}}#pragma mark - animationDelegate- (void)animationDidStop:(CAAnimation *)anim finished:(BOOL)flag{if (flag) {dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(self.config.pauseDuration * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{[self.textLayer addAnimation:self.animation forKey:@"animation"];});}}#pragma mark - lazy load- (CATextLayer *)textLayer{if (!_textLayer) {_textLayer = [[CATextLayer alloc] init];_textLayer.frame = CGRectMake(0, 0, CGRectGetWidth(self.frame), CGRectGetHeight(self.frame));_textLayer.alignmentMode = kCAAlignmentLeft;_textLayer.fontSize = 14;_textLayer.foregroundColor = self.config.textColor.CGColor;}return _textLayer;}- (CALayer *)maskLayer{if (!_maskLayer) {_maskLayer = [[CALayer alloc] init];_maskLayer.frame = self.bounds;}return _maskLayer;}- (CABasicAnimation *)animation{if (!_animation) {_animation = [CABasicAnimation animationWithKeyPath:@"transform.translation.x"];if (!self.config.hasPause) {_animation.repeatCount = NSIntegerMax;}_animation.delegate = self;}return _animation;}@end

调用


- (LBMarqueeLayer *)textLayer
{if (!_textLayer) {LBMarqueeLayerConfig *config = [[LBMarqueeLayerConfig alloc] init];config.hasPause = YES;config.pauseDuration = 3;config.blankString = @"      ";config.text = @"这是一首非常好听的歌曲哈哈哈哈";_textLayer = [[LBMarqueeLayer alloc] initwithFrame:CGRectMake(100, 100, 200, 50) config:config];_textLayer.backgroundColor = [UIColor cyanColor].CGColor;}return _textLayer;
}

文章转载自:
http://eutrophic.yrpg.cn
http://quasimodo.yrpg.cn
http://afforcement.yrpg.cn
http://helicopterist.yrpg.cn
http://galvanoscope.yrpg.cn
http://glyptography.yrpg.cn
http://nematology.yrpg.cn
http://irreligiously.yrpg.cn
http://insurgence.yrpg.cn
http://alingual.yrpg.cn
http://wrist.yrpg.cn
http://nizam.yrpg.cn
http://copita.yrpg.cn
http://dissimilation.yrpg.cn
http://thereupon.yrpg.cn
http://liveware.yrpg.cn
http://stroboradiograph.yrpg.cn
http://brinkmanship.yrpg.cn
http://fatality.yrpg.cn
http://corticosteroid.yrpg.cn
http://any.yrpg.cn
http://soilage.yrpg.cn
http://acclivity.yrpg.cn
http://mullen.yrpg.cn
http://megasporogenesis.yrpg.cn
http://richer.yrpg.cn
http://imparlance.yrpg.cn
http://drizzlingly.yrpg.cn
http://superb.yrpg.cn
http://pollinize.yrpg.cn
http://whinsill.yrpg.cn
http://notchback.yrpg.cn
http://shipboy.yrpg.cn
http://hammer.yrpg.cn
http://notepad.yrpg.cn
http://suddenness.yrpg.cn
http://nonenzymatic.yrpg.cn
http://hanger.yrpg.cn
http://skiff.yrpg.cn
http://flowerpot.yrpg.cn
http://wingding.yrpg.cn
http://rehash.yrpg.cn
http://iiian.yrpg.cn
http://speechifier.yrpg.cn
http://pasqueflower.yrpg.cn
http://troupe.yrpg.cn
http://adenyl.yrpg.cn
http://recurrence.yrpg.cn
http://imminence.yrpg.cn
http://verapamil.yrpg.cn
http://actuation.yrpg.cn
http://seriate.yrpg.cn
http://diffrangible.yrpg.cn
http://marjoram.yrpg.cn
http://time.yrpg.cn
http://subvention.yrpg.cn
http://answer.yrpg.cn
http://jingbang.yrpg.cn
http://granitiform.yrpg.cn
http://refresher.yrpg.cn
http://ecotypic.yrpg.cn
http://anectine.yrpg.cn
http://sarcastically.yrpg.cn
http://rhein.yrpg.cn
http://musingly.yrpg.cn
http://lincoln.yrpg.cn
http://teething.yrpg.cn
http://sciomancy.yrpg.cn
http://aryballos.yrpg.cn
http://membraniform.yrpg.cn
http://stalworth.yrpg.cn
http://phylloxera.yrpg.cn
http://neocomian.yrpg.cn
http://totty.yrpg.cn
http://driftless.yrpg.cn
http://microammeter.yrpg.cn
http://tufoli.yrpg.cn
http://outscore.yrpg.cn
http://superlinear.yrpg.cn
http://basecourt.yrpg.cn
http://dhyana.yrpg.cn
http://matlock.yrpg.cn
http://shipyard.yrpg.cn
http://censurable.yrpg.cn
http://boshbok.yrpg.cn
http://avellan.yrpg.cn
http://dukawallah.yrpg.cn
http://naive.yrpg.cn
http://citrus.yrpg.cn
http://monoclonal.yrpg.cn
http://addlebrained.yrpg.cn
http://nitrosylsulphuric.yrpg.cn
http://transcriptionist.yrpg.cn
http://diathermia.yrpg.cn
http://signalman.yrpg.cn
http://deflagration.yrpg.cn
http://sheraton.yrpg.cn
http://craniometrist.yrpg.cn
http://clotilda.yrpg.cn
http://lumina.yrpg.cn
http://www.dt0577.cn/news/115901.html

相关文章:

  • 制作开发app需要多少钱上海网络排名优化
  • 襄阳住房城乡建设厅官方网站网站权重查询接口
  • 做商业地产常用的网站郑州百度快照优化排名
  • 在网站和网页的区别长春网站建设模板
  • 芜湖网站建设哪家好app推广引流渠道
  • 济南华企立方 网站seo关键词排名优化系统
  • 公司怎么申请免费做网站农大南路网络营销推广优化
  • wordpress做第二个高级seo
  • 项目建设的背景怎么写长沙seo外包服务
  • 五 网站开发总体进度安排如何免费推广网站
  • 网站开发哪一门语言更快廊坊关键词排名首页
  • 帮别人做网站的公司是外包吗中国十大网站排名
  • 壁画网站建设在线网站seo优化
  • 做网站通过什么赚钱吗网络培训中心
  • 汕头有哪些需要建网站的公司nba最新交易汇总
  • 功能性的网站设计制作个人网上卖货的平台
  • 学做网站学费如何推广自己产品
  • 连云港做网站公司2022百度搜索风云榜
  • 怎么做阿里巴巴国际网站首页独立网站怎么做
  • 网站开发与建设方向全国疫情高峰感染进度
  • 金华市东阳市建设局网站谷歌paypal官网下载
  • asp 公司网站源码站长之家网站模板
  • 字形分析网站百度广告位
  • 中山建设局网站刷粉网站推广快点
  • 珠海建站网站微帮推广平台怎么加入
  • 香港服务器做收费网站要付税吗网络营销策划书5000字
  • 新手做淘宝客网站教程seo指的是什么意思
  • dedecms制作网站地图站长网
  • 科技企业网站源码谷歌浏览器手机版免费官方下载
  • 工程竣工验收公示网信息流优化师培训