創(chuàng)建uilabel
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;
[self.view addsubview:self.lbl];
點擊uibutton時修改uilabel文本尺寸
-(ibaction)buttonpressed:(id)sender
{
[self.lbl setfont:[uifont fontwithname:@arial-boldmt size:25]];
}
更多信息請查看IT技術(shù)專欄