आपको मास्टर-विवरण एप्लिकेशन टेम्पलेट का उपयोग करने की आवश्यकता है। डिवाइस परिवार ड्रॉपडाउन सूची से आईफोन चुनें। एक प्रोजेक्ट बनाने के बाद आपके ऐपडिलेगेट में UINavigationController
इंस्टेंस होगा।
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@property (strong, nonatomic) UINavigationController *navigationController;
@end
और
@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;
}
प्रश्न के समान: http://stackoverflow.com/questions/8196123/replacement-for-navigation-based-plplication-template-in-xcode-4-2?lq=1 –