title: How to make a UIView have an effect of transparent gradient?
body: <p>I want to make a <code>UIView</code> have an effect of transparent gradient from the middle to the left and right. Like in this example:</p>
  
  <p><img src="https://i.stack.imgur.com/7Svho.jpg" alt="enter image description here"></p>
  
  <p>The word <code>籍</code> has the desired effect. This view is achieved by the class <a href="https://github.com/cbpowell/MarqueeLabel-Swift" rel="noreferrer">MarqueeLabel</a>. I examined the source code, it is likely implemented by class <code>CALayer</code>. </p>