So, I am working on the Gold Challenge and decided to add the new button directly rather than adding it to the XIB file, but I cannot get the button to appear on my view. I am sure it is something simple that I am missing.
Here is my viewDidLoad method:
[super viewDidLoad] ;
// get our dimensions to place the button properly
CGRect bounds = [[self view] bounds] ;
// create our button
button = [[UIButton alloc] init] ;
[button setTitle:@“Move” forState:(UIControlStateNormal)] ;
[button setCenter:CGPointMake(bounds.size.width - 90, bounds.size.height -90)] ;
// add button to our view?
[[self view] addSubview:button] ;
“button” is declared in HeavyViewController.h
@interface HeavyViewController : UIViewController
IBOutlet UIButton *button ;
Thanks in advance…