代码如下
[UIView animateWithDuration:3 animations:^{
[imageview setTransform:(CGAffineTransformMakeTranslation(-600,0))];
[imageview setAlpha:0];
[imageview setAnimationRepeatCount:0];
}
];只能循环平移动画一次?如何一直循环下去
[UIView animateWithDuration:3 animations:^{
[imageview setTransform:(CGAffineTransformMakeTranslation(-600,0))];
[imageview setAlpha:0];
[imageview setAnimationRepeatCount:0];
}
];只能循环平移动画一次?如何一直循环下去
解决方案 »
- 如何将linux命令嵌入到objective-c中?
- xcode的nib文件
- cygwin环境设置 iPhone开发环境建立(中文Windows) 欢迎来讨论
- 求iphone手机里原有的时钟软件
- 如何让ViewControll中添加的UIView能监听到屏幕的方向转变事件?谢谢,有完整测试代码下载和说明
- 调用CFRunLoopstop (runLoop)出现exc_bad_access
- UItableviewcell的子控件不统一的情况下, 会影响重用性的性能吗?
- addsubview 一个uitableviewcontroller 和 一个uiview 设置同样的高度 显示高度不同
- iOS开发如何快速入门
- 大神进来帮忙看看,关于NSString
- 关于UIButton使用setAttributedTitle:forState:之后无法改变标题颜色
- 急!急! iOS 上传的APP的时候,报错包内的Info.plist中没有CFBundleVersion,这个怎么解决
这是方法一(你设置重复次数的对象调用错了):
[UIView animateWithDuration:3 animations:^{
[self.webView setTransform:(CGAffineTransformMakeTranslation(-600,0))];
[self.webView setAlpha:0];
[UIView setAnimationRepeatCount:0];
}];
这是方法二:
// 把这个动画封装成一个方法
[UIView animateWithDuration:3 animations:^{
[self.webView setTransform:(CGAffineTransformMakeTranslation(-600,0))];
[self.webView setAlpha:0];
} completion:^(BOOL finished) {
// 在这里再调用这个方法本身
}];