Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ios/116.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/visual-studio/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Ios Interface Builder文件中的未知类PageContentViewController_Ios_Uiviewcontroller_Interface Builder - Fatal编程技术网

Ios Interface Builder文件中的未知类PageContentViewController

Ios Interface Builder文件中的未知类PageContentViewController,ios,uiviewcontroller,interface-builder,Ios,Uiviewcontroller,Interface Builder,应用程序构建成功,但当我开始运行应用程序时,程序停止并显示此错误 PageViewDemo[1355:8607] Unknown class PageContentViewController in Interface Builder file. [UIViewController setImageFile:]: unrecognized selector sent to instance, 界面为: #import <UIKit/UIKit.h> @interface Page

应用程序构建成功,但当我开始运行应用程序时,程序停止并显示此错误

PageViewDemo[1355:8607] Unknown class PageContentViewController in Interface Builder file.
[UIViewController setImageFile:]: unrecognized selector sent to instance, 
界面为:

#import <UIKit/UIKit.h>
@interface PageContentViewController:UIViewController
@property (strong, nonatomic) IBOutlet UIImageView *backgroundImageView;
@property (strong, nonatomic) IBOutlet UILabel *titleLabel;
@property NSUInteger pageIndex;
@property NSString *titleText;
@property NSString *imageFile;
@end

确保在PageContentVC上选择了正确的目标。一些细节,如显示类、nib文件等的Xcode屏幕截图会更好。@PhilippeA导入接口PageContentViewController:UIViewController属性强,非原子IBOutlet UIImageView*backgroundImageView;性质强的非原子IBUILabel*标题标签;属性索引;属性NSString*titleText;属性NSString*imageFile;我不是这个意思。在Xcode中打开.m文件,然后在右侧面板中打开“文件检查器”,找到标题为“目标成员资格”的区域,并验证是否选中了应用程序的目标。@PhilippeA谢谢,目标已选中OK。尝试使用点语法设置imageFile属性:myPageContentVC.imageFile=。。。