In iOS7 CGContextSelectFont is deprecated. Deprecation message says that I have to use Core Text, but I don\'t know which is the exact equivalent of this piece of code:
I have found, at least in my case, the problem with the new NSString.drawAtPoint interface is that it may draw upside down, depending on how you are using the context.
An alternate is to use the Core Text methods, specifically the CTLine interface thusly:
NSDictionary *attribs = @{NSFontAttributeName:[UIFont fontWithName:@"Helvetica" size:14.0]};
NSAttributedString *fontStr = [[NSAttributedString alloc] initWithString:@"some text" attributes:attribs];
CTLineRef displayLine = CTLineCreateWithAttributedString( (__bridge CFAttributedStringRef)fontStr );
CGContextSetTextPosition( ctx, xPosition, yPosition );
CTLineDraw( displayLine, ctx );
CFRelease( displayLine );