title: iOS - add horizontal padding to tableview cells
body: <p><img src="https://i.stack.imgur.com/WOeHf.jpg" alt="enter image description here" /></p>
  <p>I want to add horizontal padding for my table view cells as the image shows.</p>
  <p>I created a subclass of <code>UITableViewCell</code>, whose width was 314 pixels (screen's width is 320), and set its frame in the <code>initWithCoder</code> method:</p>
  <pre><code>[self customizeXPosition:self.profileImage];
  [self customizeXPosition:self.birthdayLabel];
  [self customizeXPosition:self.heightLabel];
  [self customizeXPosition:self.weightLabel];
  </code></pre>
  <p>this is my <code>- (void)customizeXPosition:(UIView *)view</code>:</p>
  <pre><code>- (void)customizeXPosition:(UIView *)view {
      CGRect tmpRect = view.frame;
      tmpRect.origin.x += 3.0;
      view.frame = tmpRect;
  }
  </code></pre>
  <p>The custom cell was smaller than screen, and I moved every element in the cell to right by 3 pixels. I thought this code should achieve my goal, yet it didn't. The view didn't change in the simulator, just like I didn't write any code.</p>
  <p>how can I achieve my goal?</p>