更新时间:2023-12-04 16:04:17
问题已解决...
UILabel *arTitle = [[UILabel alloc] initWithFrame:CGRectMake(0, 200, 300, 100)];
arTitle.backgroundColor = [UIColor clearColor];
arTitle.textColor = [UIColor blueColor];
arTitle.textAlignment = NSTextAlignmentCenter;
arTitle.font = [UIFont fontWithName:@"GEDinarOne-Medium" size:16.0];
arTitle.numberOfLines = 0;
arTitle.text = @"واللقب هو عربي مع خط مخصص";
// these two line made effect...
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] initWithString:arTitle.text attributes:@{ NSFontAttributeName : [UIFont fontWithName:@"GEDinarOne-Medium" size:16], NSLigatureAttributeName: @2}];
arTitle.attributedText = attributedString;