简体   繁体   English

通用应用程序的Kal日历

[英]Kal Calendar for Universal App

I am updating my app to a universal app but there is something wrong with the Kal Calendar: 我正在将我的应用更新为通用应用,但Kal日历有问题:

在此输入图像描述

From this answer it says I should change: 从这个答案,它说我应该改变:

const CGSize kTileSize = { 46.f, 44.f }; 

to

const CGSize kTileSize = { 109.0f, 109.0f };

but then it looks great on iPad but not iPhone. 但它在iPad上看起来很棒但不是iPhone。 How can I make the Kal Calendar for both iPhone and iPad? 如何为iPhone和iPad制作Kal日历?

Any help will be appreciated! 任何帮助将不胜感激!

Thank you! 谢谢!

You can't use a constant in this case - you will have to define the value at runtime. 在这种情况下,您不能使用常量 - 您必须在运行时定义值。

Initialize kTileSize as an ivar of the class where it is defined. kTileSize初始化为定义它的类的ivar。

And then in constructor of that class do someting like: 然后在该类的构造函数中做一些像:

if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad)
{
    kTileSize = {109.0f, 109.0f};
}
else
{
    kTileSize = {46.f, 44.f}; 
}

Hi I have done a modification for Kal calendar and it has all the functionalities as below. 嗨我已经对Kal日历进行了修改,它具有以下所有功能。

  1. UI changes for the Universal application Universal应用程序的UI更改
  2. UI for orientation changes 方向更改的UI

Please find it here.... https://github.com/maheshidesilva/KalExt 请在这里找到它.... https://github.com/maheshidesilva/KalExt

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

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