Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7806293
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T02:29:17+00:00 2026-06-02T02:29:17+00:00

I have tried the iCarousel, and add it to my project. I was able

  • 0

I have tried the iCarousel, and add it to my project. I was able to put images. Now I’m trying to implement a method, that when the button was clicked the carousel will rotate.
I’ve tried this code:

- (IBAction) spinButton:(id)sender
{

    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationDuration:0.75];
    [UIView setAnimationDelegate:self];
    [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:carousel
                             cache:YES];
    [spinButton removeFromSuperview];
    [UIView commitAnimations];

}

But it seems to be that only the carousel view is animating.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T02:29:18+00:00Added an answer on June 2, 2026 at 2:29 am

    Following two method to changes aries may be your problem being solve by this,

    -(void)TappedButton:(UIButton *)sender{
    
        UIView *view=[carousel itemViewAtIndex:sender.tag];
        [UIView beginAnimations:nil context:nil];
        [UIView setAnimationDuration:0.75];
        [UIView setAnimationDelegate:self];
        [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromRight forView:view cache:YES];
        //    [spinButton removeFromSuperview];
        [UIView commitAnimations];
        NSLog(@"%d",sender.tag);
    }             
    - (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSUInteger)index reusingView:(UIView *)view
    {
        UILabel *label = nil;
    
        //create new view if no view is available for recycling
        if (view == nil)
        {
            view = [[[UIImageView alloc] initWithImage:[UIImage imageNamed:@"page.png"]] autorelease];
    //      label = [[[UILabel alloc] initWithFrame:view.bounds] autorelease];
    //      label.backgroundColor = [UIColor clearColor];
    //      label.textAlignment = UITextAlignmentCenter;
    //      label.font = [label.font fontWithSize:50];
    //        
    //        [view addSubview:label];
    
            UIButton *buttonForDisplay = [[[UIButton alloc] initWithFrame: view.bounds] autorelease];
            buttonForDisplay.backgroundColor=[UIColor clearColor];
    
            [buttonForDisplay setTitle:[NSString stringWithFormat:@"%d",index] forState:UIControlStateNormal];
            buttonForDisplay.titleLabel.font = [label.font fontWithSize:50];
            [buttonForDisplay addTarget:self action:@selector(TappedButton:) forControlEvents:UIControlEventTouchUpInside];
            [buttonForDisplay bringSubviewToFront:view];
            buttonForDisplay.tag = index;
    
    ///        view.tag=index;
            [view addSubview:buttonForDisplay];
    
    
        }
        else
        {
            label = [[view subviews] lastObject];
        }
    
        //set label
    //  label.text = [[items objectAtIndex:index] stringValue];
    
        return view;
    }
    

    EDIT
    This method thru you can catch the reference of the carousel view.

    - (UIView *)itemViewAtIndex:(NSInteger)index
    

    Edit with Animation

    UIViewController *nextViewController = [[UIViewController alloc] autorelease];
    nextViewController.view.backgroundColor = [UIColor redColor];  
    CATransition *animation = [CATransition animation];
    animation.duration = 3.5;
    animation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut]; 
    animation.type = kCATransitionPush;
    animation.subtype = kCATransitionFromTop;  
    [self.navigationController pushViewController:nextViewController animated:NO];
    [self.navigationController.view.layer addAnimation:animation forKey:nil];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have tried searching over the internet about this problem but not able to
I have a page where I'm trying to add several jCarousel elements. One of
I have tried: Project Properties > Application > Icon and Manifest and browsing to
I have a carousel that will contain images with the same width but different
I'm trying to have a list of images displayed horizontaly. It's kind of like
I have a scrolling carousel of images and captions that interact separately but coordinate.
I'm new to Flex SDK and trying to implement a simple project using Doug
Have tried to find solutions for this and can't really come up with anything.
I have tried to go through the jungle (really, PayPal, why don't you weed
I have tried this: #define format(f, ...) \ int size = strlen(f) + (sizeof((int[]){__VA_ARGS__})/sizeof(int))

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.