我正在尝试动画来切换我拥有的两个UIViewController。但是当动画运行时,旧的UIViewController是白色的。
// viewController is the new UIViewController
[UIView animateWithDuration:0.6
delay:0
options:UIViewAnimationOptionCurveLinear
animations:^(void){
[viewController.view setTransform:CGAffineTransformMakeTranslation(0, -460)];
}
completion:^(BOOL finished){
if (finished){
//
}
}
];
[[[[UIApplication sharedApplication] delegate] window] setRootViewController:viewController];
[[[[UIApplication sharedApplication] delegate] window] makeKeyAndVisible];
我有一个总是有UIViewController的对象:
@interface ManagerViews : NSObject {
UIViewController *oneController;
UIViewController *twoController;
...
}
@property(nonatomic, retain) UIViewController *oneController;
@property(nonatomic, retain) UIViewController *twoController;
...
我做错了什么?
答案 0 :(得分:0)
您是否尝试将旧的UIViewController设置为“nil”或(我的Objective-C专业知识有点生疏)重置?