I have a set of 4 images, which I want to show in If the user touches the screen, the scrolling should be stopped & amp; When the user touches the screen again, the scrolling should restart from where it was left. Simple way, I think you can help. Follow these steps: 1) Add 4 2) Create 4 different arrays for these images. NSArray * frames1 = [NSArray arrayWithObjects: [UIImage imageWithName: @ "a.png"], [UIImage imageWithName: @ "B.png"], [UIImage imageWithName: @ "C.png"], [UIImage imageWithName: @ "d.png"], zero]; NSArray * Frame2 = [NSArray arrayWithObjects: [UIImage imageWithName: @ "b.png"], [UIImage imageWithName: @ "c.png"], [UIImage imageWithName: @ "d.png"], [UIImage imageWithName: @ "A.png"], zero]; NSArray * frame3 = [NSArray arrayWithObjects: [UIImage imageWithName: @ "c.png"], [UIImage imageWithName: @ "d.png"], [UIImage imageWithName: @ "a.png"], [UIImage imageWithName: @ "B.png"], zero]; NSArray * frames4 = [NSArray arrayWithObjects: [UIImage imageWithName: @ "d.png"], [UIImage imageWithName: @ "a.png"], [UIImage imageWithName: @ "b.png"], [UIImage imageWithName: @ " C.png "], zero]; 3) Provide these arrays to all these different image views. 4) You can also add some effects ... 5) Just type 6) You can always use the I think the effect you want with this will give you . Good look !!! UIScrollView . There are advertising banners in this scroll view, so they need to scroll equally as a circle effect - the user does not need to scroll the screen. This process should be repeated.
UIImageView s vertical bottom.
yourImageView1.animationImages = frames1; YourImageView2.animationImages = frames2; YourImageView3.animationImages = frames3; YourImageView4.animationImages = frames4;
// All frames will run in 1.75 seconds. Duration = 1.75; // Repeat your image view again. Animation recurrence = 0;
startAnimating image view.
[yourImageView1 startAnimating]; [YourImageView2 Startup Permission]; [YourImageView3 Startup Permission]; [YourImageView4 Startup Permission];
-touchchesEnded method to turn the animation on and off.
- (zero) Touch-ended: (NSSET *) touches the event: (UIEvent *) event {if ([[touches the object]] == Ijes 1) {// Here you can write code to close the UIIM ve and start the animation}}
No comments:
Post a Comment