简体   繁体   English

用于ipad iOS 10的kal日历的UI问题

[英]UI Issue with kal calendar for ipad iOS 10

I'm using Kal calendar, which is open source. 我正在使用Kal日历,这是开源的。 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. 这里的问题是iOS 10无法正确呈现日期。如果您有解决方案或导致问题的原因,请告诉我。

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

Thanks 谢谢

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. 在KalTileView中使它工作。

To David: Thanks for your solution as well. 致David:感谢您的解决方案。

To Selva: I tried to replace CGContextShowTextAtPoint by drawAtPoint and also got upside down problem. 致Selva:我试图用drawAtPoint替换CGContextShowTextAtPoint,并且还遇到了颠倒问题。 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);

system font not working.Try to use below code. 系统字体不工作。尝试使用下面的代码。

UIFont *font = [UIFont fontWithName:@"Helvetica" size:fontSize]; UIFont * font = [UIFont fontWithName:@“Helvetica”size:fontSize]; in KalTileView to get it working. 在KalTileView中使它工作。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM