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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T23:42:28+00:00 2026-05-22T23:42:28+00:00

I have a multiview application and i have built a custom panelview controller to

  • 0

I have a multiview application and i have built a custom panelview controller to display panels with limited information about a product, the problem is that there should be 3 panels in portrait aspect and 4 in landscape.

Due to the depth of view controllers (about 5) the didRotateFromInterfaceOrientation: event will not trigger on the child viewcontroller so i am using the NSNotificationCenter on the rootViewController to post a message and picking it up with the child controller.

I can move the panels (UIScrollViews) without trouble but they move into place when i want them to but they move instantly which isn’t smooth or tidy, i want them to slide into their new location.

After some searching i am still having no luck finding out how to do this.

-(void) updatePanelLocations{
    int buttonWidth = 230;
    int buttonHeight = 335;
    float frameWidth = mainPanel.frame.size.width;
    int numberOfcolumns = frameWidth / buttonWidth;
    float margin = (frameWidth - (numberOfcolumns * buttonWidth)) / (numberOfcolumns +1);
    int currentRow = 0;
    int currentColumn = 0;

    CATransition *animation = [CATransition animation];
    [animation setDelegate:self];
    [animation setType:kCATransitionReveal];
    [animation setDuration:0.4];
    [animation setTimingFunction:[CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]];

    int i = 0;

    for (UIView* curView in [mainPanel subviews]) {
        //set an arbutrary tag field in generating the scrollviews so i can detect this
        if (curView.tag != 9991) continue;
        //newline detection
        if (currentColumn == numberOfcolumns){
            currentRow++;
            currentColumn = 0;
        }

        [[curView layer] addAnimation:animation forKey:@"transitionViewAnimation"]; 

        //XY Coordinates
        int buttonX = (margin * (currentColumn + 1)) + (buttonWidth * currentColumn);
        int buttonY = (margin * (currentRow + 1)) + (buttonHeight * currentRow);

        //make the frame
        [curView setFrame:CGRectMake(buttonX, buttonY, buttonWidth, buttonHeight)];        
        [curView setAutoresizingMask: UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin];
        //put the button on the target uiscrollview
        [[curView layer] removeAnimationForKey:@"transitionViewAnimation"];
        //next column
        currentColumn++;

        i++;
    }

    animation = nil;
}

How can animate this movement for sliding from a to b??

Or better still if i have it all wrong, point me in the right direction 🙂

Cheers

  • 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-22T23:42:29+00:00Added an answer on May 22, 2026 at 11:42 pm

    What you’re looking for is UIView‘s animateWithDuration: methods.

    You’ll get the appropriate duration from willRotateToInterfaceOrientation:duration: in the view controller.

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

Sidebar

Related Questions

Imagine that we have multiview apllication which is controlled by Navigation Controller. We go
I have a multiview application using a tab bar to switch views. One is
I use shake gesture for my application but i have problem! My application is
I have question here, i design multiview application using view base template. Page 1
I have a multiview iPhone app I'm developing that will have lots of inputs
I have a div inside a MultiView that is inside an UpdatePanel. When I
I have a rails application that i need to be in a subdirectory of
I have a multi view application with individual UIViewControllers and xibs. I have one
I have a multiview on my ASPX page whose ActiveViewIndex I want to set
I have a multiview control on my page and a menu to create a

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.