Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you tell if a UIScrollView content overflows

I have a UIScroll view with content in it. If that content overflows, making the scroll view scrollable, I'd like to set the bottom of the view to be a certain color. If it does not, I'd like to set it to a different color.

My issue is, I do not know how to detect if a UIScrollView's content overflows and thus is scrollable.

like image 899
steventnorris Avatar asked Mar 10 '17 02:03

steventnorris


1 Answers

Check if the scroll view's contentSize is bigger than its bounds.

like image 94
paulvs Avatar answered Oct 21 '22 11:10

paulvs