开发者

Changing content offset

开发者 https://www.devze.com 2023-02-16 12:41 出处:网络
On a button click I am a开发者_高级运维dding images to scrollview.My requirement is to show only some portion of those images as they large in width compared to screensize.so what I am doing is changi

On a button click I am a开发者_高级运维dding images to scrollview.My requirement is to show only some portion of those images as they large in width compared to screensize.so what I am doing is changing the scrollview contentoffset.Since, I want the transition to be smooth I am using animation block.But unfortunately animation block doesnot works.content offset chnage is not smooth.Please help!


scrollView.contentOffset = CGPointMake(0, 0);


I think that you want to use:

[self.scrollView setContentOffset:offset animated:YES];
0

精彩评论

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