【发布时间】:2012-11-12 12:58:38
【问题描述】:
我有一个视图控制器,可以在其中模拟视图。我有一个 firstViewController,我有 loginViewController。这是我如何在 firstViewcontroller 顶部弹出 loginViewontroller 的代码。
在 firstViewController.m 中
LoginViewController *login = [[LoginViewController alloc]initWithNibName:@"LoginViewController" bundle:NULL];
[self presentModalViewController:login animated:YES];
在 loginViewController 中我有以下功能。
-(void)initialDelayEnded {
self.view.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.001, 0.001);
self.view.alpha = 0.0;
[UIView animateWithDuration:1.0/1.5 animations:^{
self.view.transform = CGAffineTransformScale(CGAffineTransformIdentity, 1.1, 1.1);
}completion:^(BOOL complete){
[UIView animateWithDuration:1.0/2 animations:^{
self.view.transform = CGAffineTransformScale(CGAffineTransformIdentity, 0.9, 0.9);
}completion:^(BOOL complete){
[UIView animateWithDuration:1.0/2 animations:^{
self.view.transform = CGAffineTransformIdentity;
}];
}];
}];
}
在 firstViewcontroller 我有一个背景图片。我现在要做的是loginViewcontroller弹出图像仍然可见。
谁能帮帮我?
提前致谢。
【问题讨论】:
-
我想你肯定会在这里找到你的问题的答案:stackoverflow.com/questions/587681/…
-
你尝试使用它(alpha)怎么样。或者那不是你的意思?
标签: iphone objective-c ios uiviewcontroller transparency