Santosh Singh
Santosh Singh

Reputation: 887

UIScrollView scrollViewWillBeginDragging not called when content size small

UIScrollView delegate method not called when its content size is small. Is there any way to get event of scrollViewWillBeginDragging

func scrollViewWillBeginDragging(_ scrollView: UIScrollView)

Upvotes: 0

Views: 279

Answers (1)

Santosh Singh
Santosh Singh

Reputation: 887

I am able to fix it, I feel that UIScrollView behaviour to not allow scroll for smaller content is logical. In my case, requirement was to get UIScrollViewDelegate's func scrollViewDidScroll(_ scrollView: UIScrollView) method. I am able to fix it after setting scrollview property

.alwaysBounceHorizontal = true

Thank you @DonMag for suggestion.

Upvotes: 0

Related Questions