简体   繁体   English

Kal for iOS:有一种不显示表格视图的方法吗?

[英]Kal for iOS: there is a way to do not show the table view?

There is a way to do not show the UITableView in Kal, ie, just the calendar (little squares) interface? 有没有一种方法可以不显示Kal中的UITableView,即仅显示日历(小方块)界面?

Thanks in advance! 提前致谢!

You'll have to do this in code as Kal does not expose a way to do it natively. 您必须在代码中执行此操作,因为Kal不会公开本机执行此操作的方法。 You'll have to edit the code in KalView.m. 您必须在KalView.m中编辑代码。

Just comment out the below line in KalView.m addSubviewsToContentView: (line 179 in the GitHub repo I'm using). 只需注释掉KalView.m addSubviewsToContentView中的以下行:(我正在使用的GitHub存储库中的第179行)。

[contentView addSubview:tableView];

This will result in a black box which fills the rest of the parent view. 这将导致一个黑框填充整个父视图。 If you want a different color then you need to set a different color/background on the contentView or add your own UIView with the same frame as tableview . 如果要使用其他颜色,则需要在contentView上设置其他颜色/背景,或者添加自己的UIView并使用与tableview相同的框架。 You could do something like this. 你可以做这样的事情。

UIView *myView = [UIView alloc] initWithFrame:fullWidthAutomaticLayoutFrame;
myView.backgroundColor = [UIColor redColor];
[contentView addSubview:myView];

This will replace the tableView with a plane UIView with a red background. 这会将tableView替换为带有红色背景的平面UIView

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

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