Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/iphone/40.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Iphone 找不到基于导航控制器的应用程序的Xcode 4新项目模板。还有别的选择吗?_Iphone_Xcode_Ios5_Uinavigationcontroller_Navigation - Fatal编程技术网

Iphone 找不到基于导航控制器的应用程序的Xcode 4新项目模板。还有别的选择吗?

Iphone 找不到基于导航控制器的应用程序的Xcode 4新项目模板。还有别的选择吗?,iphone,xcode,ios5,uinavigationcontroller,navigation,Iphone,Xcode,Ios5,Uinavigationcontroller,Navigation,我正在做iOS 5。我找不到以前在Xcode中找到的基于导航的应用程序模板 那么我可以用什么来代替呢?使用故事板并将视图控制器拖动到其中。然后转到编辑器>嵌入>导航控制器。如果你想从头开始,从一个基于单视图的项目开始,然后转到情节提要并选择viewController,转到编辑器>嵌入>导航控制器。你需要使用主细节应用程序模板。从下拉列表中选择设备系列作为iPhone。创建项目后,appDelegate将包含UINavigationController实例 @interface AppDeleg

我正在做iOS 5。我找不到以前在Xcode中找到的基于导航的应用程序模板


那么我可以用什么来代替呢?

使用故事板并将视图控制器拖动到其中。然后转到编辑器>嵌入>导航控制器。

如果你想从头开始,从一个基于单视图的项目开始,然后转到情节提要并选择viewController,转到编辑器>嵌入>导航控制器。

你需要使用主细节应用程序模板。从下拉列表中选择设备系列作为iPhone。创建项目后,appDelegate将包含
UINavigationController
实例

@interface AppDelegate : UIResponder <UIApplicationDelegate>

@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) UINavigationController *navigationController;

@end
从空的应用程序项目开始。添加UINavigationController


这篇文章,将指导你。还有本教程。

不错!我读到最好的方法是通过一个基于视图的项目,但这似乎更像是旧的基于导航的模板。还是觉得奇怪苹果把它弄得如此晦涩。。。这是我最常用的模板:与问题类似:
@implementation AppDelegate

@synthesize window = _window;
@synthesize navigationController = _navigationController;

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
    self.window = [[[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]] autorelease];
    // Override point for customization after application launch.

    MasterViewController *masterViewController = [[[MasterViewController alloc] initWithNibName:@"MasterViewController" bundle:nil] autorelease];
    self.navigationController = [[[UINavigationController alloc] initWithRootViewController:masterViewController] autorelease];
    self.window.rootViewController = self.navigationController;
    [self.window makeKeyAndVisible];
    return YES;
}