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

  • Home
  • SEARCH
  • 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 8050485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T07:06:03+00:00 2026-06-05T07:06:03+00:00

EDIT : I’m making an app like a Slot Machine, i added iCarousel for

  • 0

EDIT :

I’m making an app like a Slot Machine, i added iCarousel for the slot object.
So I have a button that rotates the iCarousel. In my iCarousel view there are two slots (Slot1 and Slot2). Below is my iCarouselView: (The box is where the TWO carousel is)

enter image description here

This is how I spin my iCarousel:

-(IBAction) spin {

[carousel1 scrollByNumberOfItems:-35 duration:10.7550f];
[carousel2 scrollByNumberOfItems:-35 duration:10.7550f];

}

Here is what I wanna do: I want to forcefully make it stop to the index the user picks.

I have done it this way, the image below is a newViewcontroller that contains the UIImageView with a button in it, so when the user taps it, my CustomPicker pops up. My CustomPicker contains the image on what the user have picked on the camera roll. So each button has a specific value sent to my iCarouselView. carousel1 for slot1 and carousel2 for slot2.

So my problem is to spin the carousel and then for a specific time make it stop to the desired image/index the user picks.

Sorry for my bad english.
enter image description here

  • 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-05T07:06:04+00:00Added an answer on June 5, 2026 at 7:06 am

    It’s easy. I’ve done something similar before.

    In the following method below:

    - (UIView *)carousel:(iCarousel *)carousel viewForItemAtIndex:(NSUInteger)index             reusingView:(UIView *)view{
    
       //Configure your view here
       ..... 
    
      //Add a button on each view of the carousel
      UIButton * someButton = [[UIButton alloc] initWithFrame:view.bounds];
         [someButton setAlpha:0.0];
         [someButton addTarget:self action:@selector(fingerLanded:) forControlEvents:UIControlEventTouchDown];
         [view addSubview:someButton];
         [view bringSubviewToFront:someButton];
    
        //Add a tag - correspond it to the index
         someButton.tag = index;
    
       //Make sure the view is user interaction enabled
       [view setUserInteractionEnabled:YES];
    
        //Also make sure the button can actually receive touches and there is no view 
        //blocking touch events from being sent to the button.
    
      return view;
    }
    

    Also add

    - (void) fingerLanded:(id) sender{
    
    UIButton * theButtonFingerLandedOn = (UIButton *) sender;
    
    //This is the index the user tapped his finger on
    NSUInteger index = theButtonFingerLandedOn.tag;
    
    //Scroll to that particular index
    [self.carousel scrollToItemAtIndex:index animated:YES];
    

    }

    Also add

    - (void) viewDidLoad{
    
      //You may need this to enable user interaction on a view flying by    
      // Look in the - (void)transformItemViews method of the iCarousel library
      self.carousel.centerItemWhenSelected = NO;
    
     }
    

    You have to do something similar. Hope it was helpful 🙂 !!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

EDIT: See my answer below--> I am wanting to have a view that when
EDIT: Sorry about ellipsis that's not what I actually have. For declaring an array
--EDIT-- I believe this is a valid question that may have multiple answers (as
EDIT: I'd like to get a definitive answer on whether or not it's possible
EDIT: I rephrased the question because I have not explained well. Let's see if
Edit: This question looks like it might be the same problem, but has no
Edit: I would like to model a 1 to 0:1 relationship between User and
EDIT: Added debugging output with memory locations as suggested by PlasmaHH. I don't understand
Edit: The below question was answered by this . I have a new updated
EDIT: Changed as I have a different issue with the same code 2nd Edit:

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.