[英]Cannot find the Referencing Outlets declared in Objective-C File
I declared a UIView in the objective-C Class File (Test.m) 我在目标C类文件(Test.m)中声明了UIView
@property (nonatomic,strong) UIView *Scene1;
In the StoryBoard, when I am trying to make a reference outlet pointing to the view I set in the objective-C file, Scene 1 is not displayed in the list. 在情节提要中,当我尝试使参考插座指向我在Objective-C文件中设置的视图时,列表中未显示场景1。
Note: 1. I have already pointed the view to the correct class file. 注意:1.我已经将视图指向正确的类文件。 2. They are all UIView type
2.它们都是UIView类型
Here's the code of the header file (Test.h) 这是头文件(Test.h)的代码
#import "JSMessagesViewController.h"
@interface Test : JSMessagesViewController
@end
Here's the code for the Class File Test.m 这是类文件Test.m的代码
#import "Test.h"
#import "MessageData.h"
@interface DeerView () <JSMessagesViewDelegate, JSMessagesViewDataSource, UIImagePickerControllerDelegate, UINavigationControllerDelegate,UIActionSheetDelegate>
@property (strong, nonatomic) NSMutableArray *messageArray;
@property (nonatomic,strong) UIImage *willSendImage;
@property (nonatomic,strong) UIView *Scene1;
@end
@implementation DeerView
@synthesize messageArray, NameInput, Scene1, Scene2, Scene3, Scene4, Name;
...
@end
I am a high school student and a young developer who is still learning more. 我是一名高中生,一个年轻的开发人员,还在学习更多东西。 Hope you can help with my question.
希望您能为我的问题提供帮助。
Change your declaration of outlet and mark it as outlet 更改您的出口声明并将其标记为出口
@property (nonatomic, weak) IBOutlet UIView *Scene1;
And you don't need to declare it as a strong property if you won't remove it from subview. 如果您不将其从子视图中删除,则无需将其声明为强属性。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.