I'm pretty new to Objective-C, but I do understand a lot of the syntax and the way it handles objects through messages. But that's about it.
One thing I'm trying to learn is how to add UI controls programmatically and I found some sample code to try and do this. However, I'm not sure what method I need to "paste" the following code into. It's for an NSButton.
This is the sample code I found:
NSView *superview = [window contentView];
NSRect frame = NSMakeRect(10, 10, 200, 100);
NSButton *button = [[NSButton alloc] initWithFrame:frame];
[button setTitle:@"Click me!"];
Any help is appreciated!