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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T17:11:24+00:00 2026-06-09T17:11:24+00:00

Hi everybody i am using splitviewcontroller in my ipad app where selecting each row

  • 0

Hi everybody i am using splitviewcontroller in my ipad app where selecting each row in tableview will display new detailviewcontroller and in one of my detailview i am again pushing a new detailview controller(detailview2) and in that class(detailview2) i am defining a protocol and setting it and when the back button is pressed protocol method is getting fired and my rootview (tableview) is implementing that protocol but method is not getting called even after setting the delegate .if i define the same protocol in detailview1 and rootview is implementing then protocol method is not getting called here below i am posting the code .i did not understand why it is happening like that.any suggestions will be a great help. Detailview2.h

  @protocol ModalControllerDelegate;
 @interface ViewController : UIViewController<UIPopoverControllerDelegate,    UISplitViewControllerDelegate>{
    }
@property (nonatomic, assign) id <ModalControllerDelegate> delegate;
 @end
@protocol ModalControllerDelegate <NSObject>
- (void)modalControllerDidFinish:(ViewController*)modalController;
@end

Detailview2.m

-(void)back {
// Tell the controller to go back
NSLog(@"ghhskfh");
[delegate modalControllerDidFinish:self];
[self.navigationController popViewControllerAnimated:YES];
}

Rootview.h

@interface RootViewController : UITableViewController<UITableViewDelegate, UITableViewDataSource,ModalDelegate,ModalControllerDelegate> {
FirstDetailViewController *firstDetailViewController;
SecondDetailViewController *secondDetailViewController;
        MultipleDetailViewsWithNavigatorAppDelegate *appDelegate;
}
@end

Rootview.m

- (void)viewDidLoad 
{
[super viewDidLoad];
self.title=@"RootView";
self.viewcontroller=[[ViewController alloc]init];
 self.viewcontroller.delegate=self;
//[self.tableView setDelegate:self];
//[self.tableView setDataSource:self];
  }
#pragma mark -
#pragma mark ModalController delegate
- (void)modalControllerDidFinish:(ViewController *)modalController {
NSLog(@"modalControllerDidFinish");
    }

myappdelegate.m(if necessary)

 - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
    // Override point for customization after app launch.
self.splitViewController =[[UISplitViewController alloc]init];
self.rootViewController=[[RootViewController alloc]init];
self.detailViewController=[[[FirstDetailViewController alloc]init] autorelease];
UINavigationController *rootNav=[[UINavigationController alloc]initWithRootViewController:rootViewController];
UINavigationController *detailNav=[[UINavigationController alloc]initWithRootViewController:detailViewController];
self.splitViewController.viewControllers=[NSArray arrayWithObjects:rootNav,detailNav,nil];
self.splitViewController.delegate=self.detailViewController;
// Add the split view controller's view to the window and display.
[window addSubview:self.splitViewController.view];
[window makeKeyAndVisible];
return YES;
 }
  • 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-09T17:11:26+00:00Added an answer on June 9, 2026 at 5:11 pm

    Implement below code into the your App Delegate Method may be Solve your problem.

    Please try below code i thinks it’s work for calling the delegates.

    EDITED

     - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {    
        // Override point for customization after app launch.
                self.splitViewController =[[UISplitViewController alloc]init];
                self.rootViewController=[[RootViewController alloc]init];
                self.detailViewController=[[[FirstDetailViewController alloc]init] autorelease];
                UINavigationController *rootNav=[[UINavigationController alloc]initWithRootViewController:rootViewController];
                UINavigationController *detailNav=[[UINavigationController alloc]initWithRootViewController:detailViewController];
                self.splitViewController.viewControllers=[NSArray arrayWithObjects:rootNav,detailNav,nil];
                self.splitViewController.delegate=self.detailViewController;
      //Changes Made here 
                self.rootViewController.firstDetailViewController=self.detailViewController;   
     // Add the split view controller's view to the window and display.
                [window addSubview:self.splitViewController.view];
                [window makeKeyAndVisible];
                return YES;
      }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm in a position where I'm the only one using git, everybody else is
everybody! I draw a plot based on some data in my app. The plot
Hi everybody I'm new and I'm having some trouble with a connection with netbeans
everybody using mysql knows: SELECT SQL_CALC_FOUND_ROWS ..... FROM table WHERE ... LIMIT 5, 10;
Note: Using Monotouch and doing all the UI Programatically. Hello everybody, I have a
hope that everybody here is OK. We are using VS 2008 as development tool,
everybody. I am entirely new to the topic of classification algorithms, and need a
I'm using C# and .NET 2.0. My app needs some way to check the
Hy everybody, I'm trying to implement a neural network with matlab using nntool. Does
I am really confused with everybody in JS community using Node.js and NPM with

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.