iOS:对View添加动画的常用方法
2012-11-30 21:01
519 查看
废话少说,直接上代码:
-(void) showOrHiddenMenuAndButtomView{ [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.25]; // [UIView setAnimationDelay:0.5]; [UIView setAnimationDelegate:self]; // [UIView setAnimationDidStopSelector:@selector(showMenuStop)]; [UIView setAnimationCurve:UIViewAnimationCurveEaseOut]; if (ismenuViewShow) { ismenuViewShow = NO; // menuView.hidden = YES; // butttomView.hidden = YES; menuView.frame = CGRectMake(0, -60, 1024, 60); butttomView.frame = CGRectMake(0, 748, 1024, 40); } else { ismenuViewShow = YES; // menuView.hidden = NO; // butttomView.hidden = NO; menuView.frame = CGRectMake(0, 0, 1024, 60); butttomView.frame = CGRectMake(0, 708, 1024, 40); } [UIView commitAnimations]; }
相关文章推荐
- ios UIImageView添加图片动画效果,添加了手势之后,依然没有反应的解决方法
- iOS UITableView 常用方法集合
- iOS UITableView~members(常用成员方法)
- IOS中UIAlertView(警告框)常用方法总结
- IOS中UIImageView方法实现简单动画
- iOS中为UIColor创建类别 其中添加了几个常用的方法
- iOS开发手记 - iOS9.3 UINavigationController添加后不显示storyboard中viewcontroller里的控件的解决方法
- iOS UIALertViewController常用方法
- IOS中过滤HTML标签&&WebView的三种常用的使用方法
- ios添加动画的方法
- 【iOS-Cocos2d游戏开发之七】在cocos2d中添加/删除系统组件,并解决View设置透明会影响View中的其他组件的问题!更新解决添加组件Cocos2d动画停止播放的BUG】
- ios-UIActivityIndicatorView-常用方法
- ios-UIAlertView,UIActionSheet-常用方法
- iOS 开发UICollectionView及其常用方法+实例
- IOS 在MkMapView中添加自己当前位置的大头针的方法
- ios-UIScrollView-常用属性和方法
- ios 开发日记 9 - 一些 UIView 中管理 Subview 常用的方法
- IOS UITableView 常用方法及属性
- iOS tableView删除,添加,排序方法实现
- 【iOS-Cocos2d游戏开发之七】在cocos2d中添加/删除系统组件,并解决View设置透明会影响View中的其他组件的问题!【11月28日更新解决添加组件Cocos2d动画停止播放的BUG】