【发布时间】:2010-12-28 12:35:16
【问题描述】:
我有一个非常简单的项目,它尝试使用基于块的 iOS4.0 动画为 UIView 设置动画。
标题
@interface animatepadViewController : UIViewController {
UIView *contentView;
}
@property(nonatomic, retain) IBOutlet UIView *contentView;
@end
实现
// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {
[super viewDidLoad];
[UIView animateWithDuration:1.0 animations:^{self.contentView.alpha = 0.0;}];
}
我在界面生成器中添加了一个 UIVIew 类型的子视图,背景颜色为黑色。
这些是我对基于默认 ipad“视图”的项目所做的唯一更改。
我收到以下错误
2010-12-28 17:59:05.689 animatepad[29835:207] *** +[UIView animateWithDuration:animations:]: unrecognized selector sent to class 0x217689c
这只会发生在 ipad 上,不会发生在 iPhone 上
提前致谢
【问题讨论】: