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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T09:14:06+00:00 2026-05-13T09:14:06+00:00

I’m developing a game in which I’m reducing the frame size of an imageView.

  • 0

I’m developing a game in which I’m reducing the frame size of an imageView. When I’m introducing a condition using while loop, I’m not able to see the image reducing its size gradually, since it immediately jumps to the final result. So, I want to introduce a delay after every instruction so that I can see the effect of its size reduction little by little.
I can’t use timer since it needs me to specify a function to be executed after that time interval.

while(ravanImage1.frame.origin.y>=end.y)
{
ravanImage1.frame=CGRectMake(150,((ravanImage1.frame.origin.y)-5),q,z);

if(ravanImage1.center.y>=300&&ravanImage1.center.y<=370)
{
    q=60;
    z=60;
    ravanImage1.frame=CGRectMake(150,((ravanImage1.frame.origin.y)-5),q,z);
}   

if(ravanImage1.center.y>=230&&ravanImage1.center.y<=299)
{
    q=40;
    z=40;
    ravanImage1.frame=CGRectMake(150,((ravanImage1.frame.origin.y)-5),q,z);
}

if(ravanImage1.center.y>=150&&ravanImage1.center.y<=229)
{       
    q=20;
    z=20;
    ravanImage1.frame=CGRectMake(150,((ravanImage1.frame.origin.y)-5),q,z);
}
}

I want to introduce delay after every frame change.

Can anybody please help me?

  • 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-13T09:14:06+00:00Added an answer on May 13, 2026 at 9:14 am

    If you just need to pause the change during development, use the debugger’s breakpoints.

    For release, you should use an animation block to make the changes. Create a separate block for each possible change and then set the animation duration to what you’d like.

    As a general rule, you never change the frame of a view directly anymore unless you wish it to be instantaneous. Animations exist precisely for this purpose i.e. to create an effect that communicates a change in view state to the user. They’re not just eye candy.

    If for some reason, you don’t want to use animations, you could move each size change into it’s own method and then call each method with a timer. You could call the first method, which would set a timer to call the second, which would set a timer to call the third and so on.

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

Sidebar

Related Questions

No related questions found

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.