Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我创建了新文件 .h,当我将 'New Reference Outlet' 行拖到 上时drawImageView,它不会突出显示。
drawImageView
#import <UIKit/UIKit.h> #import <QuartzCore/QuartzCore.h> @interface JCDrawView : UIView @property (nonatomic,retain) IBOutlet UIImageView *drawImageView; @end
首先,打开您的 xib 并选择它的根视图。
然后,验证此视图的类是否为类型MyCustomView(JCDrawView在您的情况下)。
MyCustomView
JCDrawView
现在,可以通过您创建的视图中的插座来引用图像视图。
NOTE MyCustomView类与JCDrawView.