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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T05:31:19+00:00 2026-05-31T05:31:19+00:00

So, I have this code: timer = [NSTimer scheduledTimerWithTimeInterval:4.0 target:self selector:@selector(a) userInfo:nil repeats:YES]; This

  • 0

So, I have this code:

timer = [NSTimer scheduledTimerWithTimeInterval:4.0 target:self selector:@selector(a) userInfo:nil repeats:YES];

This code, repeat the action “a”:

-(void)a {
    self.img.image = [UIImage imageNamed:[NSString stringWithFormat:@"wp%@.jpg", i]];
    if([i isEqualToNumber:[NSNumber numberWithInt:1]]){
    i = [NSNumber numberWithInt:2];
    }else if([i isEqualToNumber:[NSNumber numberWithInt:2]]){
        i = [NSNumber numberWithInt:3];
    }else     if([i isEqualToNumber:[NSNumber numberWithInt:3]]){
        i = [NSNumber numberWithInt:1];
    }
}

This void change the image “img”, using the “i” value. I want when changing image, an effect is shown, like blurring and deblurring the “img”.

Any idea how to do this effect?

Thanks for the attention,

Alberto

  • 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-31T05:31:20+00:00Added an answer on May 31, 2026 at 5:31 am

    First, it seems it would make sense to use an NSInteger or int for i. You could then write much more economically:

    i += i<3 ? 1 : -2;
    

    Don’t forget to change your format string to @"wp%i.jpg".

    The animation would then be done like this:

    [UIView animateWithDuration:1 
                          delay:0 
                        options: UIViewAnimationCurveEaseOut
                     animations:^{
                        self.img.image = [UIImage imageNamed:
                            [NSString stringWithFormat:@"wp%i.jpg", i]];
                                 }];
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following code: timer = [[NSTimer scheduledTimerWithTimeInterval:0.50 target:self selector:@selector(onTimer) userInfo:nil repeats:YES] retain];
self.timer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(updateTimerDisplay) userInfo:nil repeats:YES]; [runLoop addTimer:self.timer forMode:NSRunLoopCommonModes]; This code-snippet is
I have this code: -(void)startRotation:(RDUtilitiesBarRotation)mode { rotationTimer = [NSTimer scheduledTimerWithTimeInterval:0.1f target:self selector:@selector(rotateSelectedItem:) userInfo:[NSNumber numberWithInt:mode]
Possible Duplicate: NSTimer doesn't stop I have this code: [NSTimer scheduledTimerWithTimeInterval:110.0 target:self selector:@selector(targetMethod:) userInfo:nil
-(IBAction)_clickautoscroll:(id)sender { NSTimer *autoscrollTimer; if (autoscrollTimer == nil) { autoscrollTimer = [NSTimer scheduledTimerWithTimeInterval:(55.0/1000.0) target:self
i m using this on uitableviewcell's didselectrow method [NSThread detachNewThreadSelector:@selector(showMyWaitView) toTarget:self withObject:nil]; it works
I have this code for a repeated timer in my app: (inside viewDidAppear) NSDate
I have an NSTimer that I init with this code: testTimer = [[NSTimer alloc]
I have this code to open multiple files one at a time that is
Ok, I have this code: var room = [ { time: 0, people: 0

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.