IOS: Adjust UIButton height depend on title text using Autolayout?
<p>I have a <code>UIButton</code> and it can change the title at the runtime. Therefore, I want to increase the <code>UIButton</code> height depend on the title text for display full text by using <code>AutoLayout</code>.     </p>

<p>I can increase the <code>UILabel</code> height by set the <code>height constraint</code> to "Greater than or Equal" but it not work with <code>UIButton</code>.<br>
I have used <code>[myButton sizeToFit]</code> but it only increase the <code>UIButon</code> width (not increase height).  </p>

<p>My current <code>UIButton</code> properties now is<br>
 - constraint height: 30 
 - leading : 15
 - trailing: 15
 - top: 5
 - fontsize: 12</p>

<p><strong>UPDATE</strong><br>
I created an IBOutlet for constraint height of <code>UIButton</code> for changing the height as <code>@NSNood</code> said.<br>
Then I need to use <code>\n</code> in title text to split line.<br>
But I don't know where should I put the <code>\n</code>? </p>

<p><strong>Here is the <code>Button</code> that I want in portrait</strong></p>

<p><a href="https://i.stack.imgur.com/JpU5V.png" rel="noreferrer"><img src="https://i.stack.imgur.com/JpU5V.png" alt="enter image description here"></a></p>

<p><strong>Here is the <code>Button</code> that I want in landscape</strong>
<a href="https://i.stack.imgur.com/8XCjj.png" rel="noreferrer"><img src="https://i.stack.imgur.com/8XCjj.png" alt="enter image description here"></a></p>

<p>How can I determine the place to put <code>\n</code>?</p>

<p>Please guide me how to achieve it with <code>AutoLayout</code>. Any help would be appreciated.  </p>