Domanda

In Apple's for iOS, when Siri answers a question and it doesn't fit on the whole screen a user can scroll through the information. What is interesting about the scroll/table view in Siri is that when information extends beyond the bounds of the scroll/table view, a subtle gradient appears on the bottom of the view:

Siri with and without a shadow

How does Siri detect that the information in the scroll / table view extend beyond its bounds? I know how easy it is to fade in an image with a shadow, but I don't understand how the detection of the content works?

Is there any kind of documentation or class that Apple provides that will let me detect this?

Thanks in advance!

È stato utile?

Soluzione

It's probably just a matter of setting the content size according to the content that you load and then testing whether the scroll view height is less than the content view height.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top