【发布时间】:2014-09-19 23:35:32
【问题描述】:
在一堂课中,我有以下内容 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
我尝试在另一个班级中称呼它 AlertEditorViewController.h
@interface AlertEditorViewController : UIViewController <UITableViewDelegate, UITableViewDataSource>
{
AlertEditorContainerViewController *containerViewController;
}
AlertEditorViewController.h #import "AlertEditorViewController.h"
@implementation AlertEditorViewController
- (IBAction)segmentSwitchValueChanged:(id)sender
{
[containerViewController swapViewControllers];
}
@end
这给出了错误“AlertEditorContainerViewController 没有可见的@interface 声明选择器 swapViewControllers”
我查看了所有其他类似的查询,它们似乎都指向我在代码中找不到的拼写错误等。
【问题讨论】:
标签: objective-c uiviewcontroller interface visibility