title: Stretching a image in iOS using colorWithPatternImage
body: <p>I have a image like this: <img src="https://i.stack.imgur.com/vkcMo.png" alt="enter image description here">. In iPad, when I place it with these code:</p>
  
  <pre><code>[separatorLineView setFrame:CGRectMake(10, 0, 430, 3)];
  separatorLineView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"divider.png"]];
  </code></pre>
  
  <p>In iPad, it shows up like this:</p>
  
  <p><img src="https://i.stack.imgur.com/JhMPO.png" alt="enter image description here"></p>
  
  <p>In iPhone, it works fine. </p>
  
  <p>The code for iPhone looks like this:</p>
  
  <pre><code>[separatorLineView setFrame:CGRectMake(10, 0, 180, 3)];
      separatorLineView.backgroundColor = [UIColor colorWithPatternImage:[UIImage imageNamed:@"divider.png"]];
  </code></pre>
  
  <p>How to avoid the repetition? Must I use resizableImageWithCapInsets?</p>
  
  <p>Need some guidance and suggestions..</p>