| 标题 | iOS中点击按钮修改文本的尺寸 |
| 范文 | 创建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]]; } |
| 随便看 |
|
在线学习网范文大全提供好词好句、学习总结、工作总结、演讲稿等写作素材及范文模板,是学习及工作的有利工具。