title: Fixing border to UILabel
body: <p>I am taking text to <code>UILabel</code> which is inside a <code>UItableViewCell</code>(label text is coming from webData-so it varies in size).</p>
  
  <p>I want to give a border for my label, which should fit the text width and height. I have created one, but it's not looking good.<br>
  Help me to improve my code.</p>
  
  <p>**Also is there any way to get border with rounded corners ? **  </p>
  
  <p>Hey I am getting text inside the border like this, and the corners are not so rounded:</p>
  
  <p><img src="https://i.stack.imgur.com/6gx1a.png" alt="enter image description here"></p>
  
  <pre><code>UILabel *cmntBoxlbl = [[UILabel alloc]initWithFrame:CGRectMake(58, 23, 250, 60)];
  cmntBoxlbl.font=[UIFont fontWithName:@"Arial" size:12];
  cmntBoxlbl.layer.borderColor = [UIColor darkGrayColor].CGColor;
  cmntBoxlbl.layer.borderWidth = 1.0;
  NSString *text = [NSString stringWithFormat:@"%@%@%@",@"  ",[[self.DtlArray objectAtIndex:indexPath.row] objectForKey:@"comment"],@" "];
  cmntBoxlbl.text = text;
  
  
  
  cmntBoxlbl.textAlignment = UITextAlignmentCenter;
  cmntBoxlbl.lineBreakMode = UILineBreakModeWordWrap;
  [cmntBoxlbl setTextColor:[UIColor darkGrayColor]];
  
  CGSize expectedLabelSize = [text sizeWithFont:cmntBoxlbl.font
                              constrainedToSize:cmntBoxlbl.frame.size
                                  lineBreakMode:UILineBreakModeWordWrap];
  
  CGRect newFrame = cmntBoxlbl.frame;
  newFrame.size.height = expectedLabelSize.height;
  cmntBoxlbl.frame = newFrame;
  cmntBoxlbl.numberOfLines = 0;
  [cmntBoxlbl sizeToFit];
  [cell addSubview:cmntBoxlbl];
  </code></pre>