iOS 7 UIButton alignment -


I'm trying to create a custom badge, for this, I create a sub-section of UIButton and Remake- (zero) draw : (CGRTE) reset:

  - (zero) Draw Draw: (CGRact) Rect {self.titleLabel.font = [UIFont system font off size: 12]; [Self-settilelolar: [UICLOR white cooler] forest: UIContolstadt normal]; Self.userInteractionEnabled = NO; Self.layer.borderWidth = 1.5f; Self.layer.cornerRadius = rect.size.width / 2; Self. Linear Shield = Yes; Self.layer.rasterizationScale = [[UIScreen main screen] scale]; Self.layer.backgroundColor = [UIColor grayColor] .CGColor; Self.layer.borderColor = [UIColor grayColor] .CGColor; }  

Everything else is better than alignment. It should be slightly as much as it should be. It looks like: Enter image details here

What to do?

@property (nonatomic) NSTextAlignment text alignment;
// default is NSTextAlignmentLeft

This is a feature of UILabel .


Comments