为什么我不能 link 故事板中的 imageVew 组件到 ViewController 中的 imageView 属性

Why I cannot link the imageVew component in storyboard to the imageView property in ViewController

我不能linkmain.storyboard中的ImageView组件到ViewController.m

中的imageView属性

下面是我的 ViewController.h 文件

ViewController.h

#import <UIKit/UIKit.h>
//#import "opencv2/videoio/cap_ios.h"

@interface ViewController : UIViewController{
    cv::CascadeClassifier faceDetector;
}

@property (nonatomic, weak) IBOutlet UIImageView* imageView;
@end

在主故事板中,我刚刚在视图中添加了一个 UIImageView

您是否control并将其从故事板拖到 .h 文件中?

在 Storyboard select 中 viewController 并在身份检查器的右上角设置 viewController 的 class(对应的 .h 文件的名称)它说 "custom class"...