In one class I have the following AlertEditorContainerViewController.m
#import "AlertEditorContainerViewController.h"
@interface AlertEditorContainerViewController ()
-(void)swapViewControllers;
@end
@implementation AlertEditorContainerViewController
@synthesize currentSegueIdentifier;
@synthesize segIndex;
- (void)swapViewControllers
{
self.currentSegueIdentifier = ([self.currentSegueIdentifier isEqual: SegueIdentifierFirst]) ? SegueIdentifierSecond : SegueIdentifierFirst;
[self performSegueWithIdentifier:self.currentSegueIdentifier sender:nil];
}
@end
The in another class I try to call it AlertEditorViewController.h
@interface AlertEditorViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>
{
AlertEditorContainerViewController *containerViewController;
}
AlertEditorViewController.h #import "AlertEditorViewController.h"
@implementation AlertEditorViewController
- (IBAction)segmentSwitchValueChanged:(id)sender
{
[containerViewController swapViewControllers];
}
@end
This gives the error "No visible @interface for AlertEditorContainerViewController declares the selector swapViewControllers'
I have looked up all of the other similar queries and they all seem to point at typos etc which I can't find in my code.