开发者

automatic scroll : how to scroll images one by one in scroll view automatically

开发者 https://www.devze.com 2023-01-12 03:47 出处:网络
I am making an image application. In that I am moving images one by one. I am also showing image thumbnail at the b开发者_开发知识库ottom of screen in scroll view.

I am making an image application. In that I am moving images one by one. I am also showing image thumbnail at the b开发者_开发知识库ottom of screen in scroll view.

My problem is when I change the image on touch in main image view, the thumbnail image should highlighted. If again changing the main view image the next thumbnail image should be highlighted.

for highlighting image I've set an image with border to the back of thumbnail image.

Now exactly I want to set that bordered image on the back of highlighted image in scrollview. and also wants to change the bordered image with change of image in main image view.

can any one suggest me how to do this thing.

thanks in advance.


yes I've done it....

simply put following line in code

[ScrlView scrollRectToVisible:frame animated:YES];

where CGRect frame = ScrlView.frame;

and set frame.origin.x = frame.size.width * 0;

if want to move on another page of scroll view, replace 0 with 1,2.... as per the requirements. and also set ScrlView.pagingEnabled = YES;

and you'l be able to change the pages of scroll view.

0

精彩评论

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