UIButton文本边距/填充
我有以下布局,并且我想在左侧和右侧添加填充。 控件是禁用的UIButton。 我创建按钮的代码是这样的: UIButton *buttonTime = [[UIButton alloc] initWithFrame:CGRectMake(90, 10, 50, 20)]; [buttonTime setBackgroundImage:[[UIImage imageNamed:@"bubble.png"] stretchableImageWithLeftCapWidth:9 topCapHeight:13] forState:UIControlStateDisabled]; [buttonTime setTitle:@"27 feb, 2011 11:10 PM" forState:UIControlStateDisabled]; [buttonTime setTitleColor:[UIColor blackColor] forState:UIControlStateDisabled]; buttonTime.titleLabel.font=[UIFont fontWithName:@"Helvetica" size:8.0]; buttonTime.titleLabel.lineBreakMode= UILineBreakModeWordWrap; [buttonTime setEnabled:FALSE]; [scrollView addSubview:buttonTime]; [buttonTime release];