目前正在開發iphone應用,需要實現通過點擊一個按鈕,修改標簽中的文本尺寸,不知道這種功能應該怎麼實現?應該是在ios5中開發的。謝謝指教~~
解決方案:
創建UILabel
[plain]
self.lbl=[[UILabel alloc] initWithFrame:CGRectMake(135, 290,200,35)];
self.lbl.backgroundColor=[UIColor clearColor];
NSString *str=[NSString stringWithFormat:@"%.f",[self.slider value]];
[self.lbl setFont:[UIFont fontWithName:@"Arial-BoldMT" size:16]];
self.lbl.text=str; www.aiwalls.com
[self.View addSubview:self.lbl];
點擊UIButton時修改UILabel文本尺寸
[plain]
-(IBAction)ButtonPressed:(id)sender
{
[self.lbl setFont:[UIFont fontWithName:@"Arial-BoldMT" size:25]];
}