Created
February 28, 2014 06:31
-
-
Save timfanda35/9266345 to your computer and use it in GitHub Desktop.
Bear實驗室:Mac開發 - OS X APP Part1 : Hello World http://www.takobear.tw/12/post/2014/02/bearmac-os-x-app-part1-hello-world.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@property (weak) IBOutlet NSTextField *message; | |
@property (weak) IBOutlet NSTextField *yourname; | |
- (IBAction)submit:(id)sender; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- (IBAction)submit:(id)sender | |
{ | |
NSString *name = [self.yourname stringValue]; | |
[self.message setStringValue:[NSString stringWithFormat:@"Welcome, %@!", name]]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment