UI Issue with kal calendar for ipad iOS 10

383 Views Asked by At

I'm using Kal calendar, which is open source. The issue here is dates are not rendering properly with iOS 10. Please let me know if you have solution or what is causing the issue.

screenshot: https://github.com/klazuka/Kal/issues/106

Thanks

3

There are 3 best solutions below

3
David On BEST ANSWER

Seems to be an issue with the system font name. I replaced
UIFont *font = [UIFont boldSystemFontOfSize:fontSize];
with
UIFont *font = [UIFont fontWithName:@"Helvetica" size:fontSize];
in KalTileView to get it working.

1
Barry Tji On

To David: Thanks for your solution as well.

To Selva: I tried to replace CGContextShowTextAtPoint by drawAtPoint and also got upside down problem. Then i add below to fix this, hope this helps

  CGContextSaveGState(ctx);
  CGContextTranslateCTM(ctx, 0.0f, self.bounds.size.height);
  CGContextScaleCTM(ctx, 1.0f, -1.0f);

  [YourTextString drawAtPoint:CGPointMake(X, Y) withAttributes:@{NSFontAttributeName:font}];

  CGContextRestoreGState(ctx);
0
Hitesh R On

system font not working.Try to use below code.

UIFont *font = [UIFont fontWithName:@"Helvetica" size:fontSize]; in KalTileView to get it working.