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 8233203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T18:03:18+00:00 2026-06-07T18:03:18+00:00

i have a problem while calling a navigation method from a presented modal view.

  • 0

i have a problem while calling a navigation method from a presented modal view.
i have three view controllers, HomeViewController,loadViewController, modalViewController.

modalViewController presented as a moda view from HomeViewController by a button press. actually what i need is , when i press a button from presented modalViewController , modal view should be dismissed and the HomeViewController should navigate to loadViewController.
its not working with my code,

HomeViewController.m

  - (IBAction)shortCutButtonPressed:(id)sender {

         ShortCutViewController *viewController=[[ShortCutViewController alloc]initWithNibName:nil bundle:nil];

         [self.navigationController presentModalViewController:viewController animated:YES];

         [viewController release];
      }


   -(void)loadViewControllerLoad
     {
         loadViewController *loadView=[[loadViewController alloc]initWithNibName:nil bundle:nil];

         [self.navigationController pushViewController:loadView animated:YES];

         [loadView release];

     }

modalViewController.m

//modal view controller will call the function loadViewControllerLoad from HomeViewController to navigate homeview to loadView. function call reaches correctly but the view is not navigating to loadView

    - (IBAction)HomeButtonPressed:(id)sender {

          homeView=[[HomeViewController alloc]initWithNibName:nil bundle:nil];

          [homeView loadViewControllerLoad];

          [[self presentingViewController] dismissModalViewControllerAnimated:YES];

          [homeView release];

       }

function call reaches at HomeViewController but the view doesn’t navigating to LoadView?

  • 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-07T18:03:20+00:00Added an answer on June 7, 2026 at 6:03 pm

    i see… your implementation is incorrect.When you are allocating your HomeViewController object in modalViewController.m , so the self.navigationController and all other properties of HomeViewController will be nil when calling loadViewControllerLoad method…So Don’t create a new object of HomeViewController . Get the object through any other way.. pass it or use propery to get the HomeViewController object from your modalViewController to call the method “loadViewControllerLoad”

    Use .nib file Names to initialize your view instead of setting it to nil.

    ShortCutViewController *viewController=[[ShortCutViewController alloc]initWithNibName:@"Your .nib name" bundle:nil];
    

    Example:

    ShortCutViewController *viewController=[[ShortCutViewController alloc]initWithNibName:@"ShortCutViewController" bundle:nil];
    

    Apply this for loadViewController and HomeViewController too…

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

Sidebar

Related Questions

I am having a problem while calling overloaded C# function through jquery post method.
I have a problem returning/processing JSON data while calling $.get() function. Here's the code:
I have a problem with header & footer while calling one external html page
i have a problem when i run a page.jsp : Exception while calling encodeEnd
I have a problem while calling a webservice. I have a .NET web service
I have problem while loading data into html select when users press or click
I have problem while using jquery maskedinput with asp.net textbox. I have a check
I have a problem while converting a string whose value is dd.mm.yyyy to DateTime
I have a problem while pasting my contents (or text) generated by Java code
I have a problem while executing a SSIS script component. To be honest I

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.