WKInterfaceTable rendering issues. Both the scroll bar and last row are cut off

久未见 提交于 2019-12-11 11:43:28

问题


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.

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.

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?

In the screenshot, the app has about 10 rows, I just scrolled way to the bottom with a bit of an extra pull just to show the cut-off from the last row... Notice the bottom of the row and the scrollbar at the top right.

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.

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.

Thanks!

Other Screenshots:


回答1:


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

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.



来源:https://stackoverflow.com/questions/29158255/wkinterfacetable-rendering-issues-both-the-scroll-bar-and-last-row-are-cut-off

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!