用Animation实现iphone动画效果.docVIP

  • 0
  • 0
  • 约小于1千字
  • 约 1页
  • 2026-01-28 发布于江西
  • 举报

ntMake(self.upView.center.x,0);

self.downView.center=CGPointMake(self.downView.center.x,(self.upView.frame.size.height+self.downView.frame.size.height)/2);

}];

typeView=middle;

}elseif(typeView==middle){

[self.downBtnsnter.x,self.downView.frame.size.height/2);

}];

typeView=up;

}

}

-(IBAction)downChange:(id)sender{

if(typeView==middle){

[self.downBtnsetHidden:YES];

[self.upBtnsetHidden:NO];

[UIViewanimateWithDuration:0.center=CGPointMake(self.downView.center.x,(self.upView.frame.size.height+self.downView.frame.size.height)/2);

}];

typeView=middle;

}

}

这是主要的代码,另外还有一些需要注意的一些小细,如你的两个view的大小,需要计算出精确位置。

下面开始学习[UIViewanimateWithDuration]方法的lay=0.0,options=0

options:是动画执行的选项

completion:是动画完成以后所要执行的代码块儿。

更多信息请查看IT技术专栏

文档评论(0)

1亿VIP精品文档

相关文档