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

微网站成功案例百度推广渠道

微网站成功案例,百度推广渠道,抖音代运营协议书范本,如何推广公司实现图片动态变化效果 多张图片连续动画实现 *方案一:直接使用UIImageView来实现 示例代码如下: UIImageView* mainImageView [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 784, 300)];mainImageView.animationImages [NSArray arrayWithOb…

实现图片动态变化效果

多张图片连续动画实现

*方案一:直接使用UIImageView来实现
示例代码如下:

UIImageView* mainImageView= [[UIImageView alloc]initWithFrame:CGRectMake(0, 0, 784, 300)];mainImageView.animationImages = [NSArray arrayWithObjects:   [UIImage imageNamed:@"icon_main_ad0.png"],[UIImageimageNamed:@"icon_main_ad1.png"],[UIImageimageNamed:@"icon_main_ad2.png"],nil];[mainImageView setAnimationDuration:9.0f];[mainImageView setAnimationRepeatCount:0];[mainImageView startAnimating];[borderView addSubview:mainImageView];[mainImageView release];

*方案二:利用定时器定时切换图片
示例代码如下:

UIImage *image = [UIImage imageNamed:@"icon_main_ad0.png"];UIImageView *imageView = [[UIImageView alloc]initWithImage:image];[imageView setFrame:CGRectMake(0, 0, 784, 300)];[self performSelector:@selector(changeImages:)withObject:imageView afterDelay:3.0];[borderView addSubview:imageView];[imageView release];
重点:
自己再定义一个改变图片的程序:
/** @DO 改变滑动图片* @param imageView 滑动视图*/
- (void) changeImages:( UIImageView *) imageView
{//这里是改变图片的程序代码,在此略去,然后递归调用自己[self performSelector:@selector(changeImages:)withObject: imageViewafterDelay:3.0];
}- (void)viewDidAppear:(BOOL)animated
{[super viewDidAppear:animated];_timer = [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(changePag) userInfo:nil repeats:YES];
}
- (void)changePag
{_counttttttt ++;[_scrollView setContentOffset:CGPointMake(SCREEN_WIDTH * ((_counttttttt % 3)  + 1), 0) animated:YES];_pageControl.currentPage = _counttttttt % 3;
}- (void)viewDidLoad {[super viewDidLoad];_pageControl = [[UIPageControl alloc] init];_pageControl.numberOfPages = 3;_pageControl.bounds = CGRectMake(0, 0, 80, 20);_pageControl.center = CGPointMake(CGRectGetMidX(self.view.frame), CGRectGetHeight(_scrollView.frame) - 20);_pageControl.currentPageIndicatorTintColor = [UIColor redColor];_pageControl.userInteractionEnabled = NO;[self.view addSubview:_pageControl];}

- (void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView
{_timer = [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(changePag) userInfo:nil repeats:YES];if (scrollView.contentOffset.x == SCREEN_WIDTH * 4) {[scrollView setContentOffset:CGPointMake(SCREEN_WIDTH, 0) animated:NO];}else if (scrollView.contentOffset.x == 0){[scrollView setContentOffset:CGPointMake(SCREEN_WIDTH * 3, 0) animated:NO];}_pageControl.currentPage = scrollView.contentOffset.x / CGRectGetWidth(self.view.frame) - 1;}
http://www.dt0577.cn/news/41310.html

相关文章:

  • 兰州网站建设哪家专业搜索引擎营销经典案例
  • 河北建设银行招聘网站百度推广怎么找客户
  • 外贸网站运营中国工商业联合会
  • 手机上可以做网站吗甲马营seo网站优化的
  • wordpress文章postid厦门seo新站策划
  • 成都网站的优化长春免费网上推广
  • react 做网站互联网运营自学课程
  • 外包公司网站淘宝热搜关键词排行榜
  • 宝安做棋牌网站建设哪家服务好网上教育培训机构排名
  • 毕设做网站有什么题目2022年最新最有效的营销模式
  • 建设工程项目管理市场seo是什么
  • 什么网站ppt做的好seo长尾关键词优化
  • 张家界seo百度seo按天计费
  • 郴州网站建设费用价格百度分公司
  • wordpress 锚点 插件seo常规优化
  • 邢台手机网站建设公司什么网站做推广比较好
  • 推广图片发布混淆信息二十条疫情优化措施
  • 国家卫生健康委员会医师定期考核系统网站推广seo
  • 可信赖的响应式网站seo关键词排名技术
  • flash代码做网站教程如何提高自己在百度的排名
  • 台州宇洋台州网站建设网络推广和网站推广
  • 2018年期刊网站建设调查品牌网站建设方案
  • 有创意的设计作品系统优化软件
  • 建设网站所采用的技术方案武汉网站开发公司
  • 一个人做网站需要多久客户引流的最快方法是什么
  • 珠海网站设计网站优化名词解释
  • 开发 网站 费用seo扣费系统
  • 医疗行业网站备案平台运营
  • 编程基础知识入门唐山百度提升优化
  • 健身网站开发可行性分析中国宣布疫情结束日期