1

我试图将数据从以前的版本迁移到实际的数据格式。当应用程序执行此操作时,我想呈现一个显示等待消息(或进度,尚未决定...)的视图。从didFinishLaunchingWithOptions呈现模态视图

目前我正在计算何时在方法AppDelegate didFinishLaunchingWithOptions中迁移,然后我想呈现该视图模态。但它根本不起作用。

我试图

[navigationController pushViewController:viewController animated:YES]; // works in a way, but it's not modal and it navigates sideways 
[navigationController presentModalViewController:viewController animated:YES]; // does nothing. 

我还搜查这个论坛,发现关于TabViewController一些答案。我试图适用于我的情况下,甚至试图:

[window addSubview:viewController.view]; 
[window makeKeyAndVisible]; 

这不正是什么。有任何想法吗?

感谢,

马克

+0

你有想过吗? –

+0

嗯......我装了一个故事板,并在那里做了所有事情(还有处理加载原始故事板)。 –

回答

1

你实例化的窗口? self_window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];} [

+0

不,我最近得知self.window变量没有被系统预先填充......:/ –