iOS: ¿Cómo configurar la fuente al dibujar texto en la generación de pdf?

Estoy generando un pdf en la aplicación ios, usando la función drawpdf, mientras llamo la función drawtext en la clase nsobject, dibuja el texto claramente según el marco y la cadena que especifiqué.

Mi codigo es

+(void)drawText:(NSString*)textToDraw inFrame:(CGRect)frameRect
{

    CFStringRef stringRef = (__bridge CFStringRef)textToDraw;
// Prepare the text using a Core Text Framesetter
    CFAttributedStringRef currentText = CFAttributedStringCreate(NULL, stringRef, NULL);
    CTFramesetterRef framesetter = CTFramesetterCreateWithAttributedString(currentText);


    CGMutablePathRef framePath = CGPathCreateMutable();
    CGPathAddRect(framePath, NULL, frameRect);

// Get the frame that will do the rendering.
    CFRange currentRange = CFRangeMake(0, 0);
    CTFrameRef frameRef = CTFramesetterCreateFrame(framesetter, currentRange, framePath, NULL);
    CGPathRelease(framePath);

// Get the graphics context.
    CGContextRef    currentContext = UIGraphicsGetCurrentContext();

// Put the text matrix into a known state. This ensures
// that no old scaling factors are left in place.
    CGContextSetTextMatrix(currentContext, CGAffineTransformIdentity);


// Core Text draws from the bottom-left corner up, so flip
// the current transform prior to drawing.
    CGContextTranslateCTM(currentContext, 0, frameRect.origin.y*2);
    CGContextScaleCTM(currentContext, 1.0, -1.0);
// Draw the frame.
    CTFrameDraw(frameRef, currentContext);

    CGContextScaleCTM(currentContext, 1.0, -1.0);
    CGContextTranslateCTM(currentContext, 0, (-1)*frameRect.origin.y*2);


    CFRelease(frameRef);
    CFRelease(stringRef);
    CFRelease(framesetter);
}

Pero necesito establecer el tamaño de fuente de texto más grande y más audaz.

solía

CGContextSelectFont(currentContext, "Helvetica", 20, kCGEncodingMacRoman);

y

CGContextSetFontSize ( currentContext, 20);

con referencia a la respuesta proporcionada por mr.texian en la función anterior, pero sin cambios

Estoy mostrando el pdf generado en uiwebview.

Tengo este código de la red. No sabía dónde editar el código para la configuración de la fuente. Cualquier ayuda será apreciada.

Respuestas a la pregunta(6)

Su respuesta a la pregunta