drawing text using CGContextShowTextAtPoint but text shown is inverted,

后端 未结 2 1851
栀梦
栀梦 2020-12-16 23:08
  - (void)drawRect:(CGRect)rect {
    CGContextRef  context = UIGraphicsGetCurrentContext();


    CGContextSelectFont(context, \"Arial\", 24, kCGEncodingMacRoman);
         


        
2条回答
  •  [愿得一人]
    2020-12-16 23:48

    This is easier:

    - (void)drawRect:(CGRect)rect {
        NSString* string = @"I am Rahul";
        [string drawAtPoint:CGPointMake(80, 80)
                   withFont:[UIFont systemFontOfSize:24]];
    }
    

提交回复
热议问题