Tuesday, 6 August 2013

CGContextShowTextAtPoint deprecated - what shall I use now?

CGContextShowTextAtPoint deprecated - what shall I use now?

The following will be considered as deprecated in iOS 7:
CGContextSelectFont, CGContextShowTextAtPoint. What should I use instead?

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. CGContextSetTextDrawingMode(UIGraphicsGetCurrentContext(), kCGTextFill);


    [[UIColor blackColor] setFill]; // This is the default
    [@"Page 1" drawAtPoint:CGPointMake(480.0, 10.0)
    withAttributes:@{NSFontAttributeName:[UIFont fontWithName:@"Helvetica"
    size:6]
    }];
    //CGContextShowTextAtPoint(UIGraphicsGetCurrentContext(), 480.0, 10.0, "Page 1", 6);

    ReplyDelete