title: How to implement the "didset of swift" in objective-c?
body: <p>Swift (from the book 《iOS Animations by Tutorials:Chapter 12》 released by <a href="http://www.raywenderlich.com/" rel="noreferrer">http://www.raywenderlich.com/</a>):</p>
  
  <pre><code>let photoLayer = CALayer()
  
  @IBInspectable
    var image: UIImage! {
      didSet {
        photoLayer.contents = image.CGImage
      }
  }
  </code></pre>
  
  <p>How can I implement the above syntax in objective-c?
  I know only to set the property of photoLayer and image like below:</p>
  
  <pre><code>@property (strong, nonatomic) CALayer *photoLayer;
  @property (strong, nonatomic) IBInspectable UIImage *image;
  </code></pre>
  
  <p>But i do not know how to implement <code>didset{...}</code> parts using objective-c syntax, please help!</p>