animation不适用于iPad。 同样的作品在iPhone上
我有一个非常简单的项目,试图使用基于块的iOS4.0animation制作UIViewanimation。
头
@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;}]; }
我在界面生成器中添加了UIVIewtypes的子视图,背景颜色为黑色。
这些是我从默认的基于ipad“view”的项目中唯一的改变。
我得到以下错误
2010-12-28 17:59:05.689 animatepad[29835:207] *** +[UIView animateWithDuration:animations:]: unrecognized selector sent to class 0x217689c
这只发生在ipad和不在iPhone上
提前致谢
要更新模拟器,您需要将Xcode更新到版本3.2.5。
你有更新你的iPad使用iOS 4.2吗? 在iPad的运输版本的iOS(3.2。)上没有可用的块