title: dynamic button width in collection view cell
body: <p><a href="https://i.stack.imgur.com/sSHRY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/sSHRY.png" alt="enter image description here"></a>my collection view cell is full size..i have collection view cell and it contains button..i successfully display all button with it's title in collection view cell. but i am having one issue that some button title is too large..i want to change it's widht based on text...how to set button width based on text..i have vertical collection view</p>
  
  <p>my array is</p>
  
  <pre><code>var arr = ["butto1 butto1 butto1","butto1 butto1butto1butto1","butto1","butto1 butto1butto1butto1"]
  </code></pre>
  
  <p>I have searched so many time but still i haven't point out
  ...any on help me..Thank you</p>