草庐IT

CGContextShowTextAtPoint

全部标签

iphone - CGContextShowTextAtPoint 和空白

为什么下面的代码忽略了空白?UIColor*textColor=[UIColorcolorWithRed:153.0/255.0green:102.0/255.0blue:51.0/255.0alpha:1.0];CGContextSetFillColorWithColor(ctx,[textColorCGColor]);CGContextSelectFont(ctx,"HelveticaNeueBold",14,kCGEncodingMacRoman);CGContextSetTextMatrix(ctx,CGAffineTransformMakeScale(1,-1));CGCon

iphone - CGContextShowTextAtPoint 已弃用 - 我现在应该使用什么?

以下内容将被视为在iOS7中已弃用:CG上下文选择字体,CGContextShowTextAtPoint。我应该改用什么? 最佳答案 您可以使用[yourStringdrawAtPoint:aPointwithAttributes:dictOfAttributes];那个的文档here.或者您可以将UILabel添加到您的View层次结构中。 关于iphone-CGContextShowTextAtPoint已弃用-我现在应该使用什么?,我们在StackOverflow上找到一个类似的问