私は、私は次のコードを使用していますサイズ46 の太字世紀のゴシック様式にボタンのラベルのフォントを設定するにはどうすればよい:iphone - セットラベルのフォント
[self.titleLabel setFont:[UIFont fontWithName:@"Century Gothic-Bold" size:46]];
が正しいかどうか私のコードですか?
私は、私は次のコードを使用していますサイズ46 の太字世紀のゴシック様式にボタンのラベルのフォントを設定するにはどうすればよい:iphone - セットラベルのフォント
[self.titleLabel setFont:[UIFont fontWithName:@"Century Gothic-Bold" size:46]];
が正しいかどうか私のコードですか?
私はあなたのフォントをサポートしていないと思う。しかしAppleGothicというフォントがあります。
このリンクを参照してください、私はこの昨日使用:
onlineButton.titleLabel.font = [UIFont boldSystemFontOfSize:onlineButton.titleLabel.font.pointSize+3];
ので、この試してみてください。更新の
yourButton.titleLabel.font = [UIFont fontWithName:fontName size:size];
あなたの方法と実装方法は正しいです。しかし、私は自分のコードに記載されているフォント名を使用するのが正しいかどうかを知りたい – Satyam
UIButton *NameBtn=[UIButton buttonWithType:UIButtonTypeCustom];
NameBtn=[[UIButton alloc]init];
[NameBtn setBackgroundColor:[UIColor clearColor]];
[NameBtn setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
NSString *textb=[[self.searchList objectAtIndex:indexPath.row] objectForKey:@"name"];
CGSize constraintb = CGSizeMake(310 ,10);
CGSize sizeb = [textb sizeWithFont:[UIFont systemFontOfSize:15] constrainedToSize:constraintb lineBreakMode:UILineBreakModeWordWrap];
[NameBtn setTitle:textb forState:UIControlStateNormal];
NameBtn.font = [UIFont fontWithName:@"Helvetica-Bold" size: 12.0];
NameBtn.frame = CGRectMake(85, 12, MAX(sizeb.width ,3.0f),12);
[NameBtn addTarget:self action:@selector(buttonClicked:) forControlEvents:UIControlEventTouchUpInside];
NameBtn.tag=indexPath.row;
[self.view addSubview:NameBtn];
感謝を。 "Helvetica Neue Condensed Black"という名前のフォントを選択した場合、どのようにコードするのですか? – Satyam