Saturday, 15 June 2013

ios - Xcode 5 without Storyboard and ARC -


I downloaded the new Xcode-5 and started using it.

Storyboard and ARC, it's not asking for alternatives like earlier versions.

So, my question is how can we use encode 5 without ARC and storyboard. We have to remove the storyboard file manually? Or is there any other option.

Create a project with a blank application and add any view controller (I here TestViewController

  - (BOOL) Application: (UIApplication *) The application did the FinishLaunchingWithOptions: (NSDictionary *) Launch option {self.window = [[UIWindow alloc] InitWithFrame: [[USScreen main screen] border]]; // Override Point for optimization after application launch. TestViewController * test = [[TestViewController alloc] initWithNibName: @ "TestviewConverter" bundle: zero]; UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController: test]; Self.window.rootViewController = nav; [Self. Windows and knowledgeable]; Yes come back }            / Strong> Strong> no .  

//////////////////////////////////////// ///////////////////////////////////End/ ///////////// //////////////////////////////////////////////// //////////////////////////////////////////////// //////////////////////////////////////////////// //////////////////////////////////////////////// ///////////////////////////////

If you have storyboard and ARC

Remove STEPS for Story Board

1) Remove the main.storyboard file from your project.

2) Add new files with xib to your controller, if it is not added to the compiled sources in the construction steps, manually add. Remove 3) from the main storyboard file base plist P> 4) Change the file didFinishLaunchingWithOptions and add:

  self.window = [[UIWindow alloc] initWithFrame: [[UIScreen main Screen] border]]; [Self. Windows and knowledgeable]; Just like:   
  - (BOOL) Application: (UIApplication *) Application FinishLaunchingWithOptions: (NSDictionary *) LaunchOptions {Self.window = [[UIWindow alloc] initWithFrame: [[UIScreen main screen] border]]; // Override Point for optimization after application launch. TestViewController * test = [[TestViewController alloc] initWithNibName: @ "TestviewConverter" bundle: zero]; UINavigationController * nav = [[UINavigationController alloc] initWithRootViewController: test]; Self.window.rootViewController = nav; [Self. Windows and knowledgeable]; Yes come back }   

Now, in the above example, you have to manually manage memory management,

  self.window = [[[UIWindow Alloc] initWithFrame: [[UIScreen main screen] border]] autorelease]; [Test release];             To  no .   

No comments:

Post a Comment