学习一些常见的动画效果 UIView动画 UIView封装的动画 ????[UIView?animateWithDuration:2.0?animations:^{
????????NSLog(@"动画执行之前:?%@",NSStringFromCGPoint(self.cutomView.center));
?...
分类:
移动开发 时间:
2015-08-21 21:44:18
阅读次数:
364
1,简单动画 ????????[UIView?animateWithDuration:(NSTimeInterval)?animations:^{
????????????<#code#>
????????}?completion:^(BOOL?finished)?{
????????????c...
分类:
移动开发 时间:
2015-08-20 22:44:47
阅读次数:
261
当我在viewDidLoad()方法内添加以下代码的时候发现程序运行时不会有动画过度效果,而是直接跳到了最后。 let x = (self.view.bounds.size.width - 268) / 2 scanImage.frame = CGRectMake(x, ...
分类:
其他好文 时间:
2015-08-20 00:59:23
阅读次数:
282
1.循环创建完5个按钮,然后在按钮的线面添加横线。2.在按钮的点击事件中实现横线滑动的frame的改变3.代码如下:[UIView animateWithDuration:.35 animations:^{ CGFloat centerX = button.center.x; CG...
分类:
其他好文 时间:
2015-08-19 12:50:04
阅读次数:
187
大家对“实例方法和类型方法”的概念应该不陌生了,在objective-c中很常见。例如:
1. 实例方法(减号开头)
- (instancetype)init;调用的时候,必须先进行实例化一个对象(alloc), 然后调用init方法。
2. 类型方法(加号开头)
+ (void)animateWithDuration:(NSTimeInterval)duration animations...
分类:
编程语言 时间:
2015-08-04 23:04:02
阅读次数:
161
[UIView animateWithDuration:0 animations:NULL completion:^(BOOL finished) { [UIView animateWithDuration:0.25 animations:^{ ...
分类:
其他好文 时间:
2015-08-03 22:13:03
阅读次数:
159
//默认没旋转 open=NO; if (open==YES) { [UIView animateWithDuration:0.03 delay:0 options:UIViewAnimationOptionCurveLinear animations:^{ btn1.transform = CG....
分类:
其他好文 时间:
2015-08-03 18:15:36
阅读次数:
143
》1.属性动画 // UIView动画 第一种方式 参数:时间间隔 [UIView animateWithDuration:3 animations:^{ self.aView.frame = CGRectMake(200, 400, 100, 100); ...
分类:
移动开发 时间:
2015-07-31 21:38:16
阅读次数:
268
_tableView_selc.frame=CGRectMake(20, 0, 20,20);[UIView animateWithDuration:0.3f animations:^{ _tableView_selc.frame=CGRectMake(20, 50, 20,20); }...
分类:
其他好文 时间:
2015-07-31 10:26:24
阅读次数:
130
【AutoLayout动画】
对于storyboard每个约束,都可以像控件那样通过拖线的方式来建立和代码的连接。
约束是一个对象,通过这个对象的constant属性可以修改约束的点数。
在修改之后,通过在UIView的animateWithDuration::方法的block内调用[self.view layoutIfNeeded]方法可以实现动画效果,调用layoutIfNeeded...
分类:
其他好文 时间:
2015-07-26 20:59:36
阅读次数:
152