开发者

Adding IBActions to UIScrollView

开发者 https://www.devze.com 2023-02-09 21:27 出处:网络
Hey, I was wondering if it would be possible to add IBActions to a UIScrollView? So when the user has s开发者_Go百科crolled to the next image an IBAction is done?

Hey, I was wondering if it would be possible to add IBActions to a UIScrollView? So when the user has s开发者_Go百科crolled to the next image an IBAction is done?

Would this be possible?


You would have to implement the UIScrollViewDelegate protocol and implement the -scrollViewDidScroll: method. In that method, you could use UIScrollView's contentOffset property to determine the current scroll position, and from there figure out what image it has scrolled to.

0

精彩评论

暂无评论...
验证码 换一张
取 消