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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T00:16:20+00:00 2026-05-20T00:16:20+00:00

I have my main program with MainAppDelegate.h,MainAppDelegate.m . I have created two custom navigation

  • 0

I have my main program with MainAppDelegate.h,MainAppDelegate.m.
I have created two custom navigation controllers ANavController, BNavController classes and have created added the controllers in Interface Builder and assigned my custom classes to the two controllers inside the MainWindow.xib

When the application first loads I make it render the first NavControllers and its view in the didFinishLaunchingWithOptions method:

[window addSubView:ANavController.view];

This is works fine and loads the first navigation controllers view. My problem is that within the view on each nav controller, inside the viewDidLoad method I have created a UIBarButtonItem which I add to the right side of the navcontroller.

I’m trying to make this button call an action method defined inside my MainAppDelegate.m.

For both of my two custom NavController classes I have set the delegate to MainAppDelegate inside interface builder. I try to define buttons like so:

[flipButton addTarget:self.delegate action:@selector(changeModeAction:) 
forControlEvents:UIControlEventTouchUpInside];

and obviously then inside MainAppDelegate.m I have defined a method:

-(void)changeModeAction:(id)sender

This method should flip the ANavigationController currently in the window to he BNavigationController.

But it obviously crashes on the addTarget:self.delegate. What’s the proper way to do this?
Basically I’m trying to add a button to the top right of each NavControl which will fire a FLIP page animation, switching to the other NavController and it’s stack.

So if you’re two levels deep on ANavController and you hit the top right button, it will flip to BNavController and wherever you were last in it’s stack. Hitting the button again will flip the page again back to ANavController and you’ll still be two levels deep, before you switched to B. Does this make sense?

I think my idea implementation needs some work?

  • 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-20T00:16:21+00:00Added an answer on May 20, 2026 at 12:16 am

    Sorry for posting this as an answer instead of a comment – my reputation is too low to add comments – but could you please provide the error message?

    EDIT: See thread below for details – the problem was that ‘self’ was not a subclass of UINavigationController and therefore did not have a delegate property. Changing this to self.navigationController.delegate worked.

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

Sidebar

Related Questions

I have two files. main.py that has main program logic and functions.py that has
I have the following program: ~/test> cat test.cc int main() { int i =
I have this program in c++: #include <iostream> using namespace std; int main() {
Okay here's the program I have typed up(stdio.h is included also): /* function main
I have: Main Program Class - uses Library A Library A - has partial
I have my main program window, and I would like to make a foldable
I have a main program which creates a collection of N child threads to
I have a main program written in C, i need it to launch another
I have a Main Program which is running a script on the target device(smart
I have a main program written in C# which creates and uses objects written

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.