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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T08:40:06+00:00 2026-05-30T08:40:06+00:00

I got an app with a simple UIView . There is a matrix NxN

  • 0

I got an app with a simple UIView. There is a matrix NxN of UIImageViews on this UIview.

I wanna turn each UIImageView. But one by one. I tried this code:

for (int k=0; k<kol; k++)
        for (int l=0; l<kol; l++)
        {
            [UIView beginAnimations:nil context:NULL];
            [UIView setAnimationDuration:0.3];
                int posTo = pole[k][l].position ;
                pole[k][l].position++;
                if (posTo == 4) {posTo=0; pole[k][l].position=1;}
                pole[k][l].imageView.transform = CGAffineTransformMakeRotation(1.57079633*posTo);
            [UIView commitAnimations];
        }

But all images rotate in the same time.

How should i separate this animation?

UPD

Right now i use this code for more complicated animation:

-(void) turnAllPole
{
    [UIView beginAnimations:nil context:NULL];
    [UIView setAnimationDuration:0.3];
    [UIView setAnimationDelay:delay];
    for (int k=0; k<kol; k++)
        for (int l=0; l<kol; l++)
        {
            if (poleBeforeTurn[k][l] == 1)
            {
                int posTo = pole[k][l].position ;
                pole[k][l].position++;
                if (posTo == 4) {posTo=0; pole[k][l].position=1;}
                pole[k][l].imageView.transform = CGAffineTransformMakeRotation(1.57079633*posTo);
           }    
        }
    [UIView commitAnimations];
    delay += 0.3;
}

that’s for synchronized rotation of some matrix’ parts (where poleBeforeTurn[k][l] == 1). But this code firstly rotate all parts in one time (like if i use in loops only pole[k][l].imageView.transform = CGAffineTransformMakeRotation(1.57079633*posTo); without animation) and after that implement animation.

How should i avoid first rotation and implement only animation?

  • 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-30T08:40:07+00:00Added an answer on May 30, 2026 at 8:40 am

    Try to set a delay to each of the UIImageView animations:

    [UIView setAnimationDelay:delay];
    

    If you increment the duration of the delay after every loop you should get the desired effect.

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

Sidebar

Related Questions

I've got a very simple app where the user selects a UIImageView and presses
I've got a very simple app. All this app needs to do is check
I write a simple bot using SimpleMUCClient. But got error: app.rb:73:in stop': deadlock detected
In a simple app I'm working on, I've got three related assemblies: MyCompany.Geography.Windows.Forms which
I've got a simple little WPF app with a TextBox and a WebBrowser control.
I've got a simple MVC (RC1) app set up, and I'm seeing some odd
I've got a very simple Windows Form app that hits an IIS 7 site
I've currently got TinyMCE incorporated into the backend editor of a simple blogging/page-editing app,
I'm learning MongoDB and Casbah by writing a simple app. Got stuck when I
I'm very new to Objective-C and Cocoa but I've made a simple app which

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.