jas bath
jas bath

Reputation: 63

need help in xcode swift uiscrollview height destination

What if I want to scroll down to a certain page and make a bookmark section for it too, my height of viewcontroller is 5000 and width is normal of a 4.7 screen, but don't know how to scroll to the certain page I want and a bookmark so the user can go there faster. help!

I am using swift

Upvotes: 0

Views: 68

Answers (2)

RJE
RJE

Reputation: 891

scrollView.setContentOffset(CGPointMake(x, y), animated: true)

or

scrollView.scrollRectToVisible(CGRectMake(x, y, w, h), animated: true)

Upvotes: 1

Alok Subedi
Alok Subedi

Reputation: 1611

    scrollView.contentOffset = CGPointMake(x, y)

Upvotes: 1

Related Questions