【发布时间】:2011-02-17 23:33:26
【问题描述】:
是否可以调整 titleLabel 的 x,y 位置 UIButton?
这是我的代码:
UIButton *btn = [UIButton buttonWithType:UIButtonTypeRoundedRect];
[btn setFrame:CGRectMake(0.0f, 0.0f, 100.0f, 100.0f)];
[btn setTitle:[NSString stringWithFormat:@"Button %d", i+1] forState:UIControlStateNormal];
[btn addTarget:self action:@selector(buttonPressed:) forControlEvents:UIControlEventTouchUpInside];
btn.titleLabel.frame = ???
【问题讨论】:
标签: ios iphone uibutton textlabel