WKInterfaceTable呈现问题.滚动条和最后一行都被切断 [英] WKInterfaceTable rendering issues. Both the scroll bar and last row are cut off

查看:106
本文介绍了WKInterfaceTable呈现问题.滚动条和最后一行都被切断的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在为Apple Watch开发一个WatchKit应用.我最初在11月/12月发布第一个测试版时完成"了该应用程序.

I'm developing a WatchKit app for the Apple Watch. I "finished" the app originally when the first beta was out back in Nov/Dec.

我最近升级了最终版本,并且WatchKit中的某些内容发生了变化(预料之中).我不得不在这里和那里修复几行代码,因为它们改变了应用程序视图的启动方式.

I recently upgraded the the final release and somethings in WatchKit changed (as to be expected). I had to fix couple lines of code here and there since they changed how the app views start up.

无论如何,修复问题后,我注意到我的WKInterfaceTable显示并正确滚动了几乎.表格的最后一行被切除(如下面的屏幕截图所示).而且,滚动条非常短-比它应该的短(也在屏幕截图中).还有其他人遇到这个吗?

Anyway, after fixing the issues I noticed that my WKInterfaceTable displays and scrolls almost correctly. The last row in the table gets cut off (as indicated in the screenshot below). Also, the scrollbar is very short - shorter than it should be (also in the screenshot). Anyone else experiencing this?

在屏幕快照中,该应用程序大约有10行,我只是滚动到底部,并有一点额外的拉动,只是为了显示从最后一行截取的内容...请注意行和滚动条在右上角.

我提供了一些额外的屏幕截图,这些屏幕截图可能会有所帮助.我研究了WKInterfaceTable上的一些教程,它们所做的实际上与我在Interface Builder中所做的没什么不同.我在这里迷路了.

I've included extra screenshots that may be helpful. I researched some tutorials on WKInterfaceTable and they're not really doing anything different than I am in the Interface Builder. I'm lost here.

我没有在代码中进行任何UI修改.我只是让WatchKit尽可能地处理UI,而无需我的任何干预.

I'm not making ANY UI modifications in code. I'm just letting WatchKit handle the UI as much as possible without any intervention from me.

谢谢!

其他屏幕截图:

推荐答案

滚动条在设计上很短,这不是错误.那就是它的本意.

The scrollbar is short by design, this isn't a bug. That's how it's meant to be.

关于删除最后一行,将表添加到WKInterfaceGroup,然后将组的高度设置为"Size to Fit Content".那应该解决它.

Regarding the cutting off of the last row, add the table into a WKInterfaceGroup, then set the group's height to 'Size to Fit Content'. That should fix it.

这篇关于WKInterfaceTable呈现问题.滚动条和最后一行都被切断的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆