UIView内部的ScrollView在作为Modal加载后不会滚动

时间:2013-07-08 21:47:46

标签: ios uiview uiscrollview modal-dialog

我有一个嵌入uiviewcontroller内部的滚动视图,按预期工作100%,直到我将其作为模态视图控制器打开。一旦发生这种情况,滚动大小大约是iOS屏幕的大小,但我肯定错过了一些东西。这就是我在appdelegate中初始化视图控制器的方式。

        UIWindow *window = [[UIApplication sharedApplication] keyWindow];
        UIViewController *currentController = window.rootViewController;
        while (currentController.presentedViewController)
            currentController = currentController.presentedViewController;

        UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"MainStoryboard" bundle:nil];
        UIViewController *newController = [storyBoard instantiateViewControllerWithIdentifier:@"Leads_Calls_SB"];

        [currentController presentViewController:newController animated:NO completion:nil];

        [[NSNotificationCenter defaultCenter] postNotificationName:@"callReceived"
                                                            object:nil
                                                          userInfo:userInfo];

0 个答案:

没有答案