私のiPhoneアプリで。ボタンクリック時のラベルの文字サイズを変更したい
3 に答える
0
実行時にフォントサイズを変更する方法は次のとおりです....
yourLabel.font=[UIFont systemFontOfSize:14];
于 2013-01-19T10:19:23.230 に答える
0
作成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];
UILabel
タップ時の文字サイズ変更UIButton
-(IBAction)ButtonPressed:(id)sender
{
[self.lbl setFont:[UIFont fontWithName:@"Arial-BoldMT" size:25]];
}
于 2013-01-19T10:20:15.140 に答える
0
-(IBAction)changeFontOfLabel:(id)sender
{
[self.lebelObject setFont:[UIFont fontWithName:@"American Typewriter" size:18];
}
また、適切なフォント名を書きます。フォント一覧はこちら
于 2013-01-19T10:20:37.507 に答える