title: Align Button to the right in UITableViewCell
body: <p>I want to have a button in my custom cell which is right aligned. Doing it with auto layout and setting a horizontal space from the right and centering it vertical does not show the Button in my cell because it is too far at the right.</p>
  
  <p><img src="https://i.stack.imgur.com/LwMAY.png" alt="MyCell"></p>
  
  <p>In the picture you can see my cell. But it is not shown like this in the actual app.</p>
  
  <p>Edit: I tried your answer but this does not seem to work. My TableView looks kind of strange in the Emulator:</p>
  
  <p><img src="https://i.stack.imgur.com/cvEeg.png" alt="enter image description here"></p>
  
  <p>Is it possible that there is a problem in my controller?</p>
  
  <pre><code>func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -&gt; UITableViewCell {
      let cell = tableView.dequeueReusableCellWithIdentifier("eventCell", forIndexPath: indexPath) as EventTableViewCell
  
      let event = items[indexPath.row]
  
      cell.contentView.autoresizingMask = UIViewAutoresizing.FlexibleHeight | UIViewAutoresizing.FlexibleWidth
  
      return cell
  }
  </code></pre>