ios中点击按钮修改文本的尺寸
2014-12-08来源:易贤网

创建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技术专栏

2025公考·省考培训课程试听预约报名

  • 报班类型
  • 姓名
  • 手机号
  • 验证码
推荐信息