这是我的头文件
#import <UIKit/UIKit.h>
#import <Foundation/Foundation.h>
#import <PolygonShape.h>
@interface Controller : NSObject {
IBOutlet UIButton *decreaseButton;
IBOutlet UIButton *increaseButton;
IBOutlet UILabel *numberOfSidesLabel;
//IBOutlet PolygonShape *shape;
}
- (IBAction)decrease;
- (IBAction)increase;
@end
这是我的实现文件
#import "Controller.h"
@implementation Controller
- (IBAction)decrease {
//shape.numberOfSides -= 1;
}
- (IBAction)increase {
//shape.numberOfSides += 1;
}
@end
为什么我的#import "Controller.h"
线路上出现以下错误?
error: PolygonShape.h: No such file or directory
PolygonShape.h 和 .m 文件与 Controller 类位于同一项目和同一目录中。