title: IOS 10,What's the current syntax for JSQMessagesAvatarImageFactory.avatarImage(Unknow parameters)
body: <p>i am following an IOS chat tutorial, but the tutorial is a little outdated,
  in the tutorial the instructor's syntax was:</p>
  
  <pre><code>JSQMessagesAvatarImageFactory.avatarImageWithImage(UIImage(named: "pictureNameWithoutExtention"), diameter: 30)
  </code></pre>
  
  <p>but this method has been replaced to:</p>
  
  <pre><code>JSQMessagesAvatarImageFactory.avatarImage(thisIsSomeCodeBlock&lt;#T##JSQMessagesAvatarImageFactory#&gt;EndSomecodeBlock)
  </code></pre>
  
  <p>i tried below codes and some others, none of them worked:</p>
  
  <pre><code>JSQMessagesAvatarImageFactory.avatarImage(UIImage(named: "pictureNameWithoutExtention"), diameter: 30)
  
  JSQMessagesAvatarImageFactory.avatarImage(with image: UIImage(named:"pictureNameWithoutExtention"), diameter: 30)
  </code></pre>
  
  <p>what is the current syntax for this method? what parameters does it take?</p>
  
  <p>also when i command+click i get this documentation but still don't understand:</p>
  
  <pre><code>/**
   *  Creates and returns a `JSQMessagesAvatarImage` object with the specified image that is
   *  cropped to a circle of the given diameter and used for the `avatarImage` and `avatarPlaceholderImage` properties
   *  of the returned `JSQMessagesAvatarImage` object. This image is then copied and has a transparent black mask applied to it, 
   *  which is used for the `avatarHighlightedImage` property of the returned `JSQMessagesAvatarImage` object.
   *
   *  @param image    An image object that represents an avatar image. This value must not be `nil`.
   *
   *  @return An initialized `JSQMessagesAvatarImage` object.
   */
  open func avatarImage(with image: UIImage) -&gt; JSQMessagesAvatarImage
  </code></pre>
  
  <p>i googled a lot about this, none of the documentation has Example or Demonstration about this method, i mean the documentations are not even written in plain english......why does everyone else seems to have no problem understand them, are there any tricks?</p>