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

  • SEARCH
  • Home
  • 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 9278705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T17:26:35+00:00 2026-06-18T17:26:35+00:00

Im relatively new to iOS programming and have been making a recipe based app

  • 0

Im relatively new to iOS programming and have been making a recipe based app for the iPad. I’ve looked around at a lot of answers and can’t seem to solve my problem so ill explain how my app is laid out.

Navigation controller -> ViewController -Modal segue -> PreviewViewController -modal segue -> Navigation Controller -> RecipeViewController

Within my RecipeViewController i have a button that when pressed i want it to go back to the “home” screen which for these purposes is the “ViewController”.

Here is the code for the button action in “RecipeViewController”:

- (IBAction)homeB:(id)sender {
ViewController* viewController = [[ViewController alloc]init];
[self.navigationController pushViewController:viewController animated:YES];
}

However, when i press this button the ViewController is displayed, but the screen is greyed out and i can have no interaction with the screen. I can’t post an image of what the screen looks like as i don’t have enough reputation yet but i will update it when i can.

I have tried other ways of displaying it such as connecting a segue in the storyboard between the button and the “ViewController” and then activating the segue when the button is pressed. But this messes up other parts of my code as i have to re allocate and initialise the home screen. Would appreciate any help as to why it is coming up with the greyed out screen that cannot be interacted with.

Also just some more notes:

self.navigationController

does not return nil so it is seen, and no errors are displayed when the button is pressed.

Thanks

  • 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-06-18T17:26:37+00:00Added an answer on June 18, 2026 at 5:26 pm

    Thanks for the responses everyone, i figured out my problem though. My structure was wrong and i realised that i didn’t need to have another navigation controller for the Recipe view Controller as i wasn’t pushing anywhere from there. So incase anyone else has a similar problem my structure is now as follows:

    Navigation Controller -> View Controller -Modal Segue -> PreviewViewController – ModalSegue -> RecipeViewController

    I removed the Navigation controller between PreviewViewController and RecipeViewController. This means that they are all modal view controllers. So to get back from the RecipeViewController to the home screen which is “ViewController” i just needed to dismiss the hierarchy of modal views with the following code:

    UIViewController * parent = self.presentingViewController;
    [parent.presentingViewController dismissViewControllerAnimated:YES completion:nil];
    

    I went back two stages so that both the PreviewViewController and the RecipeViewController where dismissed.

    Works great now, thanks for the help anyway everyone.

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

Sidebar

Related Questions

We have a lot of staff that are relatively new to iOS programming and
Relatively new to working with CR. Have lately been converting a lot of old
I am relatively new to iOS and programming, and I made an app before,
I am new to iOS app development. I have been reading the documentation on
I'm relatively new to developing iOS apps. I'm developing a note-app where users can
I'm relatively new to iOS programming. I 've made some apps to the 6.0
I'm relatively new to iOS development and I have an issue with popping view
I'm relatively new to IOS programming. I've finished a class where all the programming
Relatively new to C# and MVVM, but I'm making a WP7 app using the
I'm relatively new to iOS development and I have a question that I'm sure

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.