Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6741655
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T11:45:06+00:00 2026-05-26T11:45:06+00:00

I’ve used this method on several apps that are for sale on the app

  • 0

I’ve used this method on several apps that are for sale on the app store, but for some reason the current app I am working on is driving me nuts… I must be overlooking something.

The app’s main viewController .h file:

#import "MainMenuController.h"
#import "GamePlay.h"

@interface ProjectNameiPhoneViewController : UIViewController <MenuDelegate, GameDelegate> {
      UIViewController *currentPageController;
}

The app starts up and loads the MainMenu viewController:

UIViewController *nextController = [[MainMenuController alloc] initWithNibName:@"MainMenuController" bundle:nil];
[nextController performSelector:@selector(setDelegate:) withObject:self];

[self.view addSubview:nextController.view];

currentPageController = nextController;
[currentPageController retain];
[nextController release];

From MainMenuController.m, the user chooses to start the game:

[delegate startGameplay:self];

Back in the app’s main viewController:

- (void)startGameplay:(MainMenuController *)sender {

    UIViewController *nextController = [[GamePlay alloc] initWithNibName:@"GamePlay" bundle:nil];

    [nextController performSelector:@selector(setDelegate:) withObject:self];

    [currentPageController.view removeFromSuperview];
    [self.view addSubview:nextController.view];

    [currentPageController release];
    currentPageController = nextController;
    [currentPageController retain];
    [nextController release];
}

From the gameplay screen, user hits the back button to return to the main menu:

- (IBAction)backTapped {
    [delegate backToMenu:self];
}

Back in the app’s main viewController:

- (void)backToMenu:(GamePlay *)sender {

    UIViewController *nextController = [[MainMenuController alloc] initWithNibName:@"MainMenuController" bundle:nil];

    [nextController performSelector:@selector(setDelegate:) withObject:self];

    [currentPageController.view removeFromSuperview];
        [self.view addSubview:nextController.view];

    [currentPageController release];
    currentPageController = nextController;
    [currentPageController retain];
    [nextController release];   
}

I once again choose to start the game from the main menu.

The GamePlay class/Nib loads, and I once again click the back button to return to the main menu.

At this point the app crashes, with no information printed to the console.

Any ideas would be GREATLY appreciated – I’ve commented out almost everything else in my code to the point where this switching between viewControllers is practically the only code being run and I’m at a loss as to why it is crashing…

Thanks so much in advance for your help!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T11:45:06+00:00Added an answer on May 26, 2026 at 11:45 am

    This doesn’t seem like a true resolution but the app only crashes when I’m running it through Xcode’s “build and run.” If I open the app by clicking the icon on the device itself, the app runs perfectly. I can play it for long periods of time and mash the buttons to switch between view controllers over and over again very quickly, and it does not crash. So I’m going to submit it for the App Store even though it crashes every time without an error message when running through Xcode – it absolutely does not crash on the device itself.

    The strangest part about the crash when running through Xcode is this:
    The app crashes on the device, exiting out to the home screen. However, Xcode still shows the app as “Running” and I have the option to click “Stop” – it is not grayed out. As I said, no error message is printed to the console.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I have some data like this: 1 2 3 4 5 9 2 6
I'm working with an upstream system that sometimes sends me text destined for HTML/XML
I used javascript for loading a picture on my website depending on which small
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have just tried to save a simple *.rtf file with some websites and

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.