title: Basic example using labels and gesture recognizer not working
body: <p>I'm trying to create a basic project that uses labels and gesture recognition but am having a little difficulty. I created an interface of 4 UILabels positioned vertically along the center of the app screen. Looks something like:</p>
  
  <p>Question</p>
  
  <p>Next Question</p>
  
  <p>Answer</p>
  
  <p>Show Answer</p>
  
  <p>...just 4 labels, positioned one after the next. I make connections from Interface Builder to my <code>ViewController.h</code> file to create IBOutlet properties for each of the labels. Simple enough. I then go ahead and write all the implementation code in the <code>.m</code> file (seen below). The only issue is when the app runs, all that is displayed is four positioned labels with the default "Label" text from Interface Builder. The gesture recognizers I added to two of the labels do not seem to be connected/triggering either.</p>
  
  <p>Hoping someone could shed a little light on the issue for me. What started as a simple exercise is driving me a little mad.</p>
  
  <p>Here's my Viewcontroller.h file:</p>
  
  <pre><code>#import &lt;UIKit/UIKit.h&gt;
  
  @interface ViewController : UIViewController
  
  @property (nonatomic, strong) IBOutlet UILabel *labelQuestion;
  @property (nonatomic, strong) IBOutlet UILabel *labelNextQuestion;
  @property (nonatomic, strong) IBOutlet UILabel *labelAnswer;
  @property (nonatomic, strong) IBOutlet UILabel *labelShowAnser;
  
  @end
  </code></pre>
  
  <p>And here's my Viewcontroller.m file:</p>
  
  <pre><code>#import "ViewController.h"
  
  @interface ViewController ()
  
  @property (nonatomic, copy) NSArray *arrayQuestions;
  @property (nonatomic, copy) NSArray *arrayAnswers;
  @property (assign) int incrementer;
  
  @end
  
  @implementation ViewController
  
  - (void)viewDidLoad {
      [super viewDidLoad];
      // Do any additional setup after loading the view, typically from a nib.
  
      // First create the datasource arrays with five elements each
      self.arrayQuestions = [[NSArray alloc] init];
      self.arrayQuestions = [NSArray arrayWithObjects:@"Who am I?", @"Who are you?", @"Where are we?", @"What's going on?", @"Why is this happening?", nil];
  
      self.arrayAnswers = [[NSArray alloc] init];
      self.arrayAnswers = [NSArray arrayWithObjects:@"Damian", @"Dmitri", @"I don't know.", @"You tell me.", @"I have no clue", nil];
  
      // Reset the incrementer's value
      self.incrementer = 0;
  
      // Next configure the labels
      self.labelQuestion = [[UILabel alloc] init];
      self.labelQuestion.text = [self.arrayQuestions objectAtIndex:self.incrementer];
  
      self.labelNextQuestion = [[UILabel alloc] init];
      UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(nextQuestionLabelPressed)];
      [tap setNumberOfTapsRequired:1];
      [self.labelNextQuestion addGestureRecognizer:tap];
      self.labelNextQuestion.text = @"Show next question";
  
      self.labelAnswer = [[UILabel alloc] init];
      self.labelAnswer.text = @"?????";
  
      self.labelShowAnser = [[UILabel alloc] init];
      self.labelShowAnser.userInteractionEnabled = YES;
      UITapGestureRecognizer *tapp = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(showAnswerLabelPressed)];
      [tapp setNumberOfTapsRequired:1];
      [self.labelShowAnser addGestureRecognizer:tapp];
      self.labelShowAnser.text = @"Show answer";
  }
  
  - (void)didReceiveMemoryWarning {
      [super didReceiveMemoryWarning];
      // Dispose of any resources that can be recreated.
  }
  
  - (void)nextQuestionLabelPressed {
      self.incrementer++;
      self.labelQuestion.text = [self.arrayQuestions objectAtIndex:self.incrementer];
      self.labelAnswer.text = @"?????";
  }
  
  - (void)showAnswerLabelPressed {
      self.labelAnswer.text = [self.arrayAnswers objectAtIndex:self.incrementer];
  }
  
  @end
  </code></pre>