title: Set UITableViewCell frame with margins in Swift
body: <p>I am attempting to make a UITableViewCell with left and right margins/insets. I have made this in the past with Objective-C using the following code:</p>
  
  <pre><code>- (void)setFrame:(CGRect)frame {
      frame.origin.x += 25;
      frame.size.width -= 2 * 25;
      [super setFrame:frame];
  }
  </code></pre>
  
  <p>This code doesn't directly translate to Swift, as now I have to override the public frame variable, but placing this code in the setter of that variable has no effect. How would I get the margins to appear using this, or a similar technique in Swift?</p>
  
  <p>This is the Swift that I have attempted:</p>
  
  <pre><code>private var otherFrame: CGRect = CGRectZero
  override public var frame: CGRect {
      get {
          return otherFrame
      }
      set {
          otherFrame = frame
          otherFrame.origin.x += 25
          otherFrame.size.width -= 2 * 25
      }
  }
  </code></pre>