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 6559333
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T13:18:45+00:00 2026-05-25T13:18:45+00:00

Hi i have a uislider that changes the images in uiimageview.At first time it

  • 0

Hi i have a uislider that changes the images in uiimageview.At first time it works great there is no delay . But when i click the button to publish (there is a modal view that opens) and close the modal view (this is the second time) the uiimageview delays that shown the images.i cant find why it gets slower:(

-(IBAction)sliderSlide:(UISlider *)aSlider {

float f=slider.value;
NSString *show=[NSString stringWithFormat:@"%.0f %%",f];
label2.text=show;
NSString *show1=[NSString stringWithFormat:@"%.0f",f];
imageView.image = [UIImage imageNamed:[NSString stringWithFormat:@"/Smiley_000%@.png", show1]];

float slid=slider.value;
if(slid>99)
{
    [imageView1 setHidden:NO];
    [imageView2 setHidden:YES];
    NSString *fullpath = [[[NSBundle mainBundle] bundlePath] stringByAppendingString:@"/Smiley_00099.png"];
    imageView.image = [UIImage imageWithContentsOfFile:fullpath];
    secondarray=[NSArray arrayWithObjects:  
                 [UIImage imageNamed:@"Rays_00000.png"],
                 [UIImage imageNamed:@"Rays_00001.png"],
                 [UIImage imageNamed:@"Rays_00002.png"],
                 [UIImage imageNamed:@"Rays_00003.png"],
                 [UIImage imageNamed:@"Rays_00004.png"],
                 [UIImage imageNamed:@"Rays_00005.png"],
                 [UIImage imageNamed:@"Rays_00006.png"],
                 [UIImage imageNamed:@"Rays_00007.png"],
                 [UIImage imageNamed:@"Rays_00008.png"],
                 [UIImage imageNamed:@"Rays_00009.png"],
                 nil];

    imageView1.animationImages = secondarray;        
    // How many seconds it should take to go through all images one time.
    imageView1.animationDuration = 0.5;
    // How many times to repeat the animation (0 for indefinitely).
    imageView1.animationRepeatCount = 0;
    [imageView1 startAnimating];
}
else if (slid<1)
{
    [imageView2 setHidden:NO];
    [imageView1 setHidden:YES];
    NSString *fullpath = [[[NSBundle mainBundle] bundlePath] stringByAppendingString:@"/Smiley_0000.png"];
    imageView.image = [UIImage imageWithContentsOfFile:fullpath];
    firstarray=[NSArray arrayWithObjects:  
                         [UIImage imageNamed:@"Teardrop_00000.png"],
                         [UIImage imageNamed:@"Teardrop_00001.png"],
                         [UIImage imageNamed:@"Teardrop_00002.png"],
                         [UIImage imageNamed:@"Teardrop_00003.png"],
                         [UIImage imageNamed:@"Teardrop_00004.png"],
                         [UIImage imageNamed:@"Teardrop_00005.png"],
                         [UIImage imageNamed:@"Teardrop_00006.png"],
                         [UIImage imageNamed:@"Teardrop_00007.png"],
                         [UIImage imageNamed:@"Teardrop_00008.png"],
                         [UIImage imageNamed:@"Teardrop_00009.png"],
                         [UIImage imageNamed:@"Teardrop_00000.png"],
                         [UIImage imageNamed:@"Teardrop_00000.png"],
                         [UIImage imageNamed:@"Teardrop_00000.png"],
                         [UIImage imageNamed:@"Teardrop_00000.png"],
                         [UIImage imageNamed:@"Teardrop_00000.png"],
                         nil];


    imageView2.animationImages = firstarray;        
    // How many seconds it should take to go through all images one time.
    imageView2.animationDuration = 0.8;

    // How many times to repeat the animation (0 for indefinitely).
    imageView2.animationRepeatCount = 0;
    [imageView2 startAnimating];
    [self.view addSubview:imageView2];
}
else 
{
    [imageView1 setHidden:YES];
    [imageView2 setHidden:YES];
    [imageView1 stopAnimating];
    [imageView2 stopAnimating];
}
[[NSUserDefaults standardUserDefaults] setFloat:slid forKey:@"slider"];
[[NSUserDefaults standardUserDefaults] synchronize];
}

this is my code if u can see why performance decrease in the second time i slide the slider pls tell me

edit 1:

i cancel some animations and slider get back to its speed but now the pictures are sticking slider okey but pictures are slow then the first time.

  • 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-05-25T13:18:46+00:00Added an answer on May 25, 2026 at 1:18 pm

    My alertview makes the application (slider and images) goes slower so i remove it and it work just fine.

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

Sidebar

Related Questions

So a UISlider works great to change/choose values but it just doesn't look that
I have a method that gets called any time a control on my view
I have 4 UITextFields that I'm dynamically creating, in the viewDidLoad, which works good.
I want to rotate a image with UIslider control. I have done that with
I have a custom UITableViewCell that contains a UISlider control and a UILabel which
I have a UISlider as part of a view that is loaded into a
For example, I have a UISlider that calls - (IBAction)sliderMoved:(id)sender , which performs some
I have a UISlider that I want to update a UITextField for the value
I have a UISlider that I wan't to have a custom look for. I
I have an UISlider that shows the progress of a song, and the user

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.