@
Sunnyyoung 好,在官网 Start Developing iOS Apps (Swift)找到代码了
#import "ViewController.h"
@
implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view.
}
- (IBAction)button1:(NSButton *)sender {
_myLabel.stringValue = @"test";
}
- (void)setRepresentedObject:(id)representedObject {
[super setRepresentedObject:representedObject];
// Update the view, if already loaded.
}
@
end#import <Cocoa/Cocoa.h>
@
interface ViewController : NSViewController
@
property (weak) IBOutlet NSTextField *myLabel;
@
end