【发布时间】:2012-10-22 16:57:30
【问题描述】:
我有一个带有两个子视图(1.UIScrollView 和 2.UIView)的 UIView(超级视图),第一个视图是登录表单,第二个视图包含启动动画(带有 UIImageView)。动画完成后,我将其从 superview 中删除,然后,在验证登录后,它会呈现一个新的 TabBarViewController,其中有一个 Home 和其他导航控制器。主页导航控制器有一个注销按钮,注销的动作在tabBarViewController中被称为“注销”方法,这种方法会自行关闭以返回登录表单。
@implementation LoginViewController
MainTabBarViewController *mainTabBarViewController = [[self storyboard] instantiateViewControllerWithIdentifier:@"MainTabBarViewController"];
[self presentViewController: mainTabBarViewController animated: YES completition: nil];
Logout works fine as long as the keyboard is never shown, otherwise the login form doesn´t appear, the superview does.
@implementation MainTabBarViewController
-(void)logout{
[self dismissViewControllerAnimated: YES completition: nil];
}
我注意到 loginView (1.ScrollView) 位于堆栈顶部,并且 hidden 属性为 NO。
有什么想法吗?提前谢谢你
注意:我使用 ARC、故事板和 iOS 5
【问题讨论】: