다음 코드를 자세히 읽어보십시오. 그것은 완벽하게 작동하기 때문입니다. 응용 프로그램에 추가하십시오. 잘 작동 할 것입니다.UILabel 설정 - 코드를 통한 글꼴 - 오류 발생 - iPhone
- (void)viewDidLoad {
[super viewDidLoad];
// title label - tip
UILabel *tmp=[[UILabel alloc] initWithFrame:CGRectMake(50, 50, 200, 200)];
tmp.textColor=[UIColor colorWithRed:(14.0/255.0) green:(105.0/255) blue:(128.0/255) alpha:1.0];
[tmp setFont:[UIFont fontWithName:@"Arial" size:18]]; [email protected]"sagar";
tmp.backgroundColor=[UIColor clearColor]; [self.view addSubview:tmp]; [tmp release];
}
이제 다음 코드를주의 깊게 읽어보십시오. 그것은 작동하지 않기 때문에. 두 코드의 차이점은 없습니다.
- (void)viewDidLoad {
[super viewDidLoad];
// title label - tip
UILabel *tmp=[[UILabel alloc] initWithFrame:CGRectMake(50, 50, 200, 200)];
tmp.textColor=[UIColor colorWithRed:(14.0/255.0) green:(105.0/255) blue:(128.0/255) alpha:1.0];
[tmp setFont:[UIFont fontWithName:@"Arial Black" size:18]]; [email protected]"sagar";
tmp.backgroundColor=[UIColor clearColor]; [self.view addSubview:tmp]; [tmp release];
}
방금 # Arial # 대신 #Arial Black #을 언급했습니다.
- 그러나 작동하지 않습니다.
- iPhone이 = Arial Black =을 지원하지 않기 때문입니까?
왜 작동하지 않는지 알고 싶습니다.
iPhone은 얼마나 많은 종류의 글꼴을 지원합니까?
목록이 있습니까?
UILabel 또는 컨트롤에 글꼴 이름을 설정하는 방법은 무엇입니까? (이름 안에 공백이있는 글꼴)
저와 함께 지식을 공유해 주셔서 감사합니다.