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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T11:55:41+00:00 2026-06-18T11:55:41+00:00

Sorry if this seems like a simple question, but every time I search on

  • 0

Sorry if this seems like a simple question, but every time I search on google for this subject all I can find is how to pass data from a child view to a parent view, not vice versa.

Basically, I am presenting a modal view, which is in its own UINavigation controller. The modal view needs to know if it is allowed to be ‘edited’ by the user or not – so I thought the most simple way to do this would be to set a BOOL on the child view (isEdit) to TRUE (this would get set depending on the segue that is occurring) However because this modal view is being presented from a UINavigation controller – I cannot access it from the -(void)prepareForSegue function and set the BOOL directly. I have tried subclassing the UINav controller, and including a BOOL in it that can be set, then checked back in the child view, but I cannot seem to access the controller from the child view – I would include my code, but I am sure there must be a more simple way of accomplishing this task!

Is anyone able to suggest a more economical way of passing this boolean ‘through’ the UINavigationController to the child view?

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-18T11:55:42+00:00Added an answer on June 18, 2026 at 11:55 am

    If your segue invokes a navigation controller, you can set properties on the root view controller from -prepareForSegue, like so

    - (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender
    {
        if ([segue.identifier isEqualToString:@"MySegueId"]) {
            UINavigationController *navController = (UINavigationController *)segue.destinationViewController;
            MyViewController *childController = (MyViewController *)navController.childViewControllers.lastObject;
            childController.isEditable = YES;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry if this question may be simple, but I can't seem to find an
Sorry if this question seems a bit complex but I think its all related
Sorry for this simple question but I seem not to find any other way
Sorry this is such a basic question, but I can't find a straight answer
Sorry if my question seems a little noobish but I can't find an answer.
Sorry if this seems like a silly question - I am an amateur when
Sorry if this question seems stupid, but it's stumped me for a couple days,
This seems like it should be easy as pie, but I can't seem to
Sorry if this question is too silly or neurotic... But I can't figure it
I'm sorry if this sounds like a stupid question, because it seems to be

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.