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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T11:26:15+00:00 2026-05-25T11:26:15+00:00

Hi there I’m having some problems coding an animation for a UIView in my

  • 0

Hi there I’m having some problems coding an animation for a UIView in my iPhone app. I’m trying to set an animation for the frame of the UIView after i updated the frame property. Here is the code.

//old frame values are: 0, 0, 15, 37

//set the frame for hiding the arrow
[arrow setFrame:CGRectMake(-15, 100, 15, 37)];

//Create an animation to let the arrow slide in the view.
[UIView beginAnimations:@"SlideInArrow" context:nil];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];
[UIView setAnimationBeginsFromCurrentState:true];
[UIView setAnimationDuration:1.0];
[symbolArrow setFrame:CGRectMake(0, 100, 18, 37)];
[UIView commitAnimations];

this code is a part of a method i wrote. It will be fired when the user is pressing a button. i suggest, that the UI won’t update the new frame values to the object. Instead the animation uses the old values. Why is it so? Is there a way to get the view or the animation to get the new frame values?

  • 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-25T11:26:16+00:00Added an answer on May 25, 2026 at 11:26 am

    You’re setting animationBeginsFromCurrentState:, which explicitly tells the system to animate based on where the view currently is on the screen. At this point in time, the frame is still at {0,0} because the run loop hasn’t completed, so none of your previous setFrame: transactions have been applied. First, take this line out, which may fix it by itself. If not, there are other ways to set the fromValue the way you describe.

    The basic flow is odd, however. If the code is as you suggest, the arrow is on screen at {0,0}, and you’re going to make it vanish and slide back on. Is that really the animation you’re going for, or is there more animations that you’ve left out? What’s the full effect you’re trying to achieve?

    Note that you have arrow in one case and symbolArrow in another, which I assume is a typo, but would definitely be a problem if these were different objects.

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

Sidebar

Related Questions

For some reason, after submitting a string like this Jack’s Spindle from a text
There's a thrird party app that needs to get information via custom http headers,
There's a column on one of my tables that's being updated by various INSERT/DELETE
There are some Magento Connect extensions that I find myself installing every time I
There is a QListWidget containing keywords for search and a QTextEdit containing some text.
There doesn't seem to be any tried and true set of best practices to
We're building an app, our first using Rails 3, and we're having to build
There must be a simple solution to this, but after 4 hours of browsing
There's a lot of reading on self referencing problems, but I can't seem to
There was some code like this: // Convenience to make things more legible in

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.