首页 > 网站 > 建站经验 > 正文

iOS中点击按钮修改文本的尺-寸

2019-11-02 14:42:31
字体:
来源:转载
供稿:网友

 创建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 fontWith

蓝光电影[www.aikan.tv/special/languangdianying/]
Name:@"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]];
}

发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表