Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't Link up UIButton with File's Owner in XCode
    text
    copied!<p>I started my intrepid journey into learning objective-c for ios, and got as far as trying to build my view in the interface builder, when I realized that I can't link up the buttons I'm creating to my File's Owner. I have made sure that my File's owner has my view controller selected, and have tried restarting xcode and the interface builder. Here's the contents of both my .h and .m files:</p> <p>My CalculatorViewController.h file:</p> <pre><code>#import &lt;UIKit/UIKit.h&gt; #import "CalculatorBrain.h" @interface CalculatorViewController : UIViewController { IBOutlet UILabel *display; CalculatorBrain *brain; } - (IBAction):digitPressed:(UIButton *)sender; - (IBAction):operationPressed:(UIButton *)sender; @end </code></pre> <p>And the CalculatorViewController.m file: </p> <pre><code>#import "CalculatorViewController.h" @implementation CalculatorViewController - (void)didReceiveMemoryWarning { // Releases the view if it doesn't have a superview. [super didReceiveMemoryWarning]; // Release any cached data, images, etc that aren't in use. } - (void)viewDidUnload { // Release any retained subviews of the main view. // e.g. self.myOutlet = nil; } - (void)dealloc { [super dealloc]; } @end </code></pre> <p>In short, every time I click on a button in my Interface Builder View, hold CTRL, and drag the blue line over to "File's Owner," nothing happens. In the tutorial I'm watching (The Stanford Fall 2010 IOS tutorials, lesson 2 - if that helps) shows File's Owner highlighting and working like a champ. Any help would be much appreciated. Thanks!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload