I have a UIPopoverController in my project.

File composition

Mainfile.h
Mainfile.m
Mainfile.xib (VIEW)

tableview.h
tableview.m
tableview.xib (TABLE VIEW)

i put my method for my PopoverController in my mainfile. My problem is i cannot access my method from mainfile.m to tableview.m when i select a row in a table.

My code

Mainfile.h

```
UIPopoverController *popMenu;
@property(nonatomic,retain) IBOutlet UIPopoverController *popMenu;
-(IBAction)showPopOverid) sender;
-(IBAction)hidePopOver;

```

Mainfile.m

```
#import "tableview.h"

-(IBAction)showPopOverid) sender {

if ([popMenu isPopoverVisible]) {
[popMenu dismissPopoverAnimated:YES];
} else {

tableview *toc = [[tocView alloc] init];
popMenu = [[UIPopoverController alloc] initWithContentViewController:toc];
[toc release];
[popMenu presentPopoverFromBarButtonItem:sender permittedArrowDirections:UIPopoverArrowDirectionAn y animated:YES];

}

}

-(IBAction)hidePopOver {
NSLog(@"hidePopOver");
[popMenu dismissPopoverAnimated:YES];
}

```

in other file

tableview.m

```
- (void)tableViewUITableView *)tableView didSelectRowAtIndexPathNSIndexPath *)indexPath {

//I WANT TO ACCESS THE METHOD of hidePopOver from the mainfile so i can hide my popViewController
// i've tried a lot but not working
NSLog(@"hidePopOver"); 

}

```

Thank you in advance guys