I'm sorry if a basic question.
How to insert in NSImageView image? This code does not work:
Xcode:
@interface MyInitMainWindow : NSObject {
NSImage *StrIconUser;
IBOutlet NSImageView *IconUser;
}
-(IBAction)MySetImageid)sender;
@end
@implementation MyInitMainWindow
-(IBAction)MySetImageid)sender
{
[StrIconUser initWithContentsOfFile"~/Users/admin/Pictures/apple_big.jpg"];
[IconUser setImage:StrIconUser];
}
@end
Interface Builder:
IconUser outlets for NSImageView.
MySetImage action for NSButton.
How to insert in NSImageView image? This code does not work:
Xcode:
@interface MyInitMainWindow : NSObject {
NSImage *StrIconUser;
IBOutlet NSImageView *IconUser;
}
-(IBAction)MySetImageid)sender;
@end
@implementation MyInitMainWindow
-(IBAction)MySetImageid)sender
{
[StrIconUser initWithContentsOfFile"~/Users/admin/Pictures/apple_big.jpg"];
[IconUser setImage:StrIconUser];
}
@end
Interface Builder:
IconUser outlets for NSImageView.
MySetImage action for NSButton.