title: how to make a gradient border of UIView?
body: <p>I want to make a gradient border of view like the following picture: </p>
  
  <p><img src="https://i.stack.imgur.com/71ZWH.png" alt="Image"></p>
  
  <p>but I don't know how do it exactly , i.e. what the gradient color I should use to do it? how to set my view to show a border like the image? </p>
  
  <p>I'm using the following code to get a border:</p>
  
  <pre><code> self.view.layer.borderColor = [UIColor orangeColor].CGColor;
   self.view.layer.borderWidth = 2.0f;
  </code></pre>