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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T22:18:44+00:00 2026-06-06T22:18:44+00:00

I am working on a splitView application for my iPad . I have implemented

  • 0

I am working on a splitView application for my iPad. I have implemented a UIButton called as Upload. On clicking on it, a UITableView appears inside a UIPoverController. On clicking on any of the contents, I want to display some respective site in my UIwebView in UIDetailView. For this I have implemented a delegate method protocol. I have used the following lines of code in UploadTableViewController.h file::

@protocol UploadTableViewDelegate <NSObject>
@required
- (void)selected:(NSString *)his;
@end


 @interface UploadSpaceTableViewController : UITableViewController{
id<UploadSpaceTableViewDelegate> delegate;
}

@property (retain) id delegate;
@end

In the corresponding .m file I have used the following lines of code ::

- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{

if (delegate != nil) {
    NSString *hisSelected = [keys objectAtIndex:indexPath.row];
    NSLog(@"%@ lolwa", hisSelected);
    [delegate selected:hisSelected];
}

}

in the .m file of class where I have implemented the function Selected, the code is ::

- (void)selected:(NSString *)Key {    
  NSLog(@"hello");    
  [self.UploadSpaceTableViewPopover dismissPopoverAnimated:YES];
}


-(IBAction)uploadpressed:(id)sender{  
Upload.delegate = self;
self.Upload = [[UploadSpaceTableViewController alloc] 
                         initWithStyle:UITableViewStylePlain];
self.UploadTableViewPopover = [[UIPopoverController alloc] 
                                initWithContentViewController:UploadSpace];               

[self.UploadTableViewPopover presentPopoverFromBarButtonItem:sender 
                                permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES];
 }

However, I am unable to get hello (written in the function Selected) NSLogged in gdb. This is the first time that I am using this delegate method protocol. I am unable to sort this out. Can someone help me out ? Thanks and regards.

  • 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-06T22:18:45+00:00Added an answer on June 6, 2026 at 10:18 pm

    Delegation works like this

    • declare a protocol – you have done this
    • declare a delegate property – you have done this
    • In the class which you want to be the delegate say it conforms to the protocoll

      @interface MyClass : MySuperClass <UploadTableViewDelegate>

    • set the delegate property so the delegate class can get the delegate messages

      uploadSpaceTVC.delegate = self;

    • call the delegate methods in your non delegate class (UploadSpaceTableViewController)

      [self.delegate selected:@"test"];

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

Sidebar

Related Questions

I am working on a universal app, I used UISplitViewController in doing iPad application.
Solved Hey all, I'm currently working on a Split-View Based Application for iPad. I
I have implemented a WebApp using SplitView - http://asyraf9.github.com/jquery-mobile/ - (and that seems to
I am working on an iPad app with a split view controller. I have
So I have a split view application I am working on and have encountered
I have made an application for IPad in objective C. In this I am
I am working on trying to make a splitview based application. I am trying
I've been working on an iPad application that has about 15 view controllers. Some
I am working on a split-view based application for the iPad. I created a
Hi I am working With Ipad Application I want to Add UISplitView to UIViewController

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.