title: UILabel Padding based on content
body: <p>i've problems with uilable padding. i want to make my uilabel have padding event just one character display</p>
  
  <p><a href="http://i.stack.imgur.com/T4Aet.png" rel="nofollow">http://i.stack.imgur.com/T4Aet.png</a></p>
  
  <p>so i have padding from "Ask Question" words,</p>
  
  <p>what i have done is:</p>
  
  <pre><code>#import "NetraCell.h"
  #import &lt;QuartzCore/QuartzCore.h&gt;
  @implementation NetraCell
  @synthesize NetraLabelForPrice,NetraImageDeals;
  
  
  - (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
  {
      self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
      if (self) {
  
          /////implement for NetraLabelForPrice
  //
           NetraLabelForPrice=[[UILabel alloc] init];
           NetraLabelForPrice.backgroundColor=[UIColor brownColor];
           NetraLabelForPrice.textColor=[UIColor whiteColor];
           NetraLabelForPrice.textAlignment=NSTextAlignmentCenter;
           NetraLabelForPrice.font=[UIFont fontWithName:@"HelveticaNeue-Bold" size:18];
           [NetraLabelForPrice.layer setCornerRadius:20];
  
  
      //   NetraImageDeals=[[UIImage alloc] init];
       [self.contentView addSubview:NetraLabelForPrice];
           /////
  
  
      }
      return self;
  }
  
  - (void)setSelected:(BOOL)selected animated:(BOOL)animated
  {
      [super setSelected:selected animated:animated];
  
      // Configure the view for the selected state
  }
  - (void)layoutSubviews {
  
      [super layoutSubviews];
      self.imageView.frame = CGRectMake(10.0f, 15.0f, 80.0f, 80.0f);
      self.NetraLabelForPrice.frame = CGRectMake(100.0f, 15.0f, NetraLabelForPrice.frame.origin.x, 25);
      [self.imageView.layer setCornerRadius:7.0f];
      [self.NetraLabelForPrice.layer setCornerRadius:7.0f];
  
  }
  @end
  </code></pre>
  
  <p>i put like this </p>
  
  <pre><code>self.NetraLabelForPrice.frame = CGRectMake(100.0f, 15.0f, NetraLabelForPrice.frame.origin.x, 25);
  </code></pre>
  
  <p>but why when i label.text just " -  " the width not decrease ?</p>