我正在使用 PDF 。我正在以编程方式创建 PDF。如果有任何建议,我可以写粗体和斜体格式但无法更改字体的颜色?在此先感谢我的代码如下
NSString *textToDraw3 = @"Installation Address Details:";
font = [UIFont systemFontOfSize:13.0];
stringSize = [textToDraw3 sizeWithFont:font
constrainedToSize:CGSizeMake(pageSize.width - 2*kBorderInset-2*kMarginInset, pageSize.height - 2*kBorderInset - 2*kMarginInset)
lineBreakMode:UILineBreakModeWordWrap];
renderingRect = CGRectMake(kBorderInset + kMarginInset, kBorderInset + kMarginInset + 230.0, pageSize.width - 2*kBorderInset - 2*kMarginInset, stringSize.height);
[textToDraw3 drawInRect:renderingRect
withFont:font
lineBreakMode:UILineBreakModeWordWrap
alignment:UITextAlignmentLeft];