当您要求您设置您的博客时,如何在iPad中的其他视图之上加载视图,例如在wordpress应用中。你可以展示或张贴一些示例代码。我有一个NSUSerdefaults设置,所以它会在第一次启动时显示。我希望这种看法看起来像这样http://uplr.me/files/p45064.png如何在iPad的另一个视图上加载视图
看看它是如何有阴影和视图是在背后变暗。那就是我想要做的。
当您要求您设置您的博客时,如何在iPad中的其他视图之上加载视图,例如在wordpress应用中。你可以展示或张贴一些示例代码。我有一个NSUSerdefaults设置,所以它会在第一次启动时显示。我希望这种看法看起来像这样http://uplr.me/files/p45064.png如何在iPad的另一个视图上加载视图
看看它是如何有阴影和视图是在背后变暗。那就是我想要做的。
我得到了它
AddViewController* firstLaunchController = [[AddViewController alloc] initWithNibName:nil bundle:nil];
UINavigationController *modalNavigationController = [[UINavigationController alloc] initWithRootViewController:firstLaunchController];
modalNavigationController.modalTransitionStyle = UIModalTransitionStyleCrossDissolve;
modalNavigationController.modalPresentationStyle = UIModalPresentationFormSheet;
[detailViewController presentModalViewController:modalNavigationController animated:YES];
[firstLaunchController release];
是如此简单,
谢谢大家
第二个视图是作为第一个视图的模态视图加载的。见-[UIViewController presentModalViewController:animated:]
。
在iPad上,当您呈现模态视图时,会自动变暗。
我一直在使用WordPress的,从一些代码尝试,但不能得到它的任何工作。我使用这个现在 \t如果:{ \t \t CFirstLaunchViewController *笔尖= [[CFirstLaunchViewController页头] initWithNibName:无捆绑:无]([[NSUserDefaults的standardUserDefaults] boolForKey @ “isFirstLaunch”]!); \t \t [window addSubview:nib.view]; \t \t nib.view.frame = CGRectMake(270,288,540,576); \t \t [笔尖发布]; \t} 我需要做什么。你能写出我需要的代码吗 我对这个相当新颖01谢谢 – Frankrockz 2010-04-08 16:08:15
你不'添加为子视图。您使用presentModalViewController:来代替。请注意,它是一个视图控制器而不是视图。请参阅http://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIViewController_Class/Reference/Reference.html#//apple_ref/occ/instm/UIViewController/presentModalViewController:animated上的示例代码: – TechZen 2010-04-08 19:42:36
感谢与我们分享您的代码。 – 2010-04-09 20:08:20