I was trying to make an app for practice. Its basically a greeting app written in Cocoa and Objective-C. It has a textfield that asks for the user name. And a textView that prints out Hello, userName. Okay, I got this done with a button that starts the action. When I type in something say Kris. And pressed the button, It came up with something like this
Hello, <NSTextField:0x100223740>
Nothin else
I am not sure what the words in the <> mean开发者_开发技巧...
Thanks in Advance, Kris
your not returning the textviews text.
try:
NSString *helloUser = [NSString stringWithFormat:@"Hello %@!",textView.text];
NSLog(@"OUTPUT: %@",helloUser);
精彩评论