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

网站怎么做海外推广方案wordpress qq登陆接口

网站怎么做海外推广方案,wordpress qq登陆接口,网站推广seo代理,做网站用什么编程语言好效果图 该跑马灯完全通过CATextLayer 实现#xff0c;轻量级#xff0c;并且通过 系统的位移动画实现滚动效果#xff0c;避免了使用displaylink造成的性能瓶颈#xff0c;使用系统动画#xff0c;系统自动做了很多性能优化#xff0c;实现更好的性能#xff0c;并使用…效果图 该跑马灯完全通过CATextLayer 实现轻量级并且通过 系统的位移动画实现滚动效果避免了使用displaylink造成的性能瓶颈使用系统动画系统自动做了很多性能优化实现更好的性能并使用遮罩实现展示范围的限定 实现跑马灯效果 // // LBMarqueeLayer.m // TEXT // // Created by mac on 2024/4/28. // Copyright © 2024 刘博. All rights reserved. //#import LBMarqueeLayer.himplementation 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; }endinterface LBMarqueeLayer () CAAnimationDelegateproperty (nonatomic, strong) CATextLayer *textLayer;property (nonatomic, strong) CALayer *maskLayer;property (nonatomic, strong) LBMarqueeLayerConfig *config;property (nonatomic, strong) CABasicAnimation *animation;endimplementation 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://www.hkea.cn/news/14478423/

相关文章:

  • 网站建设经验做法和取得的成效网站主题颜色
  • phpcms 手机网站模板免费网页设计作品
  • 网站建设开场白网站建设经费预算策划书
  • 昆明大型网站建设费用北京外贸网站建设
  • 机械行业做网站全屋定制十大名牌品牌
  • 网站开发工程师职业道德上海公司网站建设哪家好
  • 建筑网站建设方案株洲seo优化首选
  • 网站建设合同需要印花税专做装修的网站
  • 成都网站建设的公司哪家好网站流量攻击软件
  • 品牌网站部门建设做的最好的微电影网站
  • 网站备案帐号wordpress 格局调整
  • 购物网站可行性分析报告中国充电网络公司排名
  • 未来做那些网站能致富河北省建设工程安全生产网站
  • 我的世界服务器网站怎么做wordpress 角色后台权限
  • 网站建设从哪几个情况去判上海浦东新区
  • 怎么分析一个网站app与手机网站
  • 自建网站阿里云备案通过后怎么做网站建设策划书参考案例
  • 区块链网站开发做大型网站费用
  • 临海做网站的公司免费erp企业管理系统
  • 烟台电商网站建设青岛网站建设信息公示
  • 前端网站做中 英文自适应手机网站开发
  • 国外儿童社区网站模板深圳网站制作公司咨询
  • 东莞网站设计企业网站备案核验点 上海
  • 事业单位网站建设的账务处理游戏制作公司
  • 建网站新科网站建设深圳市宝安区中医院
  • 高校廉洁文化建设网站中国互联网百强企业名单
  • 郑州网站建设 股权投资设计公司logo大全
  • 全屏网站万荣做网站
  • 做视频网站多大空间够福州小程序开发外包
  • wap网站搜索网站建设专业用语