당신은 코드에 의해 작동 할 수 있습니다. UILabel에 속성 문자열을 할당하는 동안 정확히 동일한 문제에 직면해야했습니다. 코드로 해결했습니다. 다음 코드를 참조하십시오.
NSString *s = @"Why so serious?";
NSMutableAttributedString *str=[[NSMutableAttributedString alloc] initWithString:s];
NSInteger _stringLength=[s length];
UIColor *_red=[UIColor redColor];
[str addAttribute:NSFontAttributeName value:[UIFont boldSystemFontOfSize:25] range:NSMakeRange(0, _stringLength)];
[str addAttribute:NSStrokeColorAttributeName value:_red range:NSMakeRange(0, _stringLength)];
[str addAttribute:NSStrokeWidthAttributeName value:[NSNumber numberWithFloat:-3.0] range:NSMakeRange(0, _stringLength)];
self.aLabel.attributedText = str;
희망이 있습니다. :)
인터페이스 빌더에서 길을 찾을 수 없지만 프로그래밍 방식으로 NSFttRef를 작성하여 NSAttributedString에 대한 속성 사전에 넣으려고 kCTFontEmphasizedSystemFontType을 사용합니다. 코드에서 레이블의 속성이 지정된 텍스트 속성을 어떻게 할당합니까? – Bamsworld
@Bamsworld 인터페이스 빌더에서 작성했습니다. 맞아, 이제 NSFontAttribute를 값 "[UIFont boldSystemFontOfSize : size]"가있는 NSAttributedString 중 하나로 사용해야합니다. – andyPaul