Reputation: 16051
I have a UIScrollView which I want to bounce when it scrolls, but currently it's able to bounce despite the content size being the same as the frame. How can I stop it from bouncing if the content size and frame are the same size? Is there a more elegant way than overriding setContentSize and setFrame with a check for it?
Upvotes: 0
Views: 225
Reputation: 351
You can have check that
if(scrollView.contentSize==frame.size)
{
scrollView.bounce = NO;
}
else
{
scrollView.bounce = YES;
}
Upvotes: 1