Questions tagged [animatewithduration]

a block-based animation method for the UIView class in iOS, to automatically "tween" animations.

Automatically transitions from the starting state, to the specified ending state, over the specified duration.

Related links

151 questions
0
votes
0 answers

swift: SKNode position not animating

I'm rotating a ball based on pan gestures, and I want to add inertia. To do this, I decided to use animateWithDuration when pan gesture finished. The problem is that instead of animating, the position of the ball changes straight away. I'll be…
Sam
  • 1,130
  • 12
  • 36
0
votes
2 answers

Separate function for UIView animateWithDuration animations and completion parameters

I am working with animations in iOS7 with objective-c. I am trying to use the animateWithDuration function which has the following definition: [UIView animateWithDuration:(NSTimeInterval) animations:^(void)animations completion:^(BOOL…
0
votes
1 answer

Repeating NSTimer causes truncated animateWithDuration on first animation

I have a UIViewController that, depending on the frequency set by user, displays images in a animateWithDuration fade-in/fade-out every X seconds (say, 5 or 10). To manage the regularly timed calls to fade-in/out the images, I have a NSTimer that is…
Uzumaki Naruto
  • 547
  • 5
  • 18
0
votes
1 answer

What is the frame rate and speed function for animateWithDuration

[UIView animateWithDuration: animations:^{}] I'm replacing the use of the above with my own custom animation method. However, I quite like the standard effect this has. So my question is what is the frame rate of animateWithDuration? And what is…
AndyW
  • 985
  • 3
  • 10
  • 21
0
votes
0 answers

UIView animateWithDuration & UIView commitAnimations stops working strangely

I have some animations on my app like this: [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:0.3]; navigasyonresmi.frame = CGRectMake((windowgenisligimiz-10)/4, 194, 10, 4); [UIView setAnimationDelegate:self]; [UIView…
woheras
  • 109
  • 1
  • 5
  • 16
0
votes
1 answer

Scale animation is being stopped when new animation starts

Hi have around 10 UIButtons that I am animating around the screen. When a user taps one, the button is scaled up, then moved and scaled down to a certain point on the screen. I'm using a single method to manage the animate. I pass the index number…
0
votes
1 answer

animateWithDuration not being run at all

I have a ViewController WITHOUT autolayout, and I'm trying to animate some of the buttons. I have some UIView animateWithDuration code in the ViewDidAppear, and everything there works great. But when I want to animate the view out, nothing animates.…
0
votes
1 answer

UIViewAnimateWithDuration completion never called

I am using the UIView animateWithDuration:delay:options:animations:completion: method but the completion method is never getting called. Here is my code: [UIView animateWithDuration:1 delay:0 options:UIViewAnimationOptionAllowUserInteraction…
Abdullah Shafique
  • 6,878
  • 8
  • 35
  • 70
0
votes
1 answer

UIButton Animation not working

I am new at xcode and I am learning something new each day, I have gotten stuck. I want to create a custom button on a second Storyboard (MapTwoViewController), lets say it is a custom button that looks like a cloud and it goes from left to right. I…
Dan Davies
  • 163
  • 3
  • 14
0
votes
2 answers

ios7 animateWithDuration with tableview issue

I have method to animate simultaneously search bar and table view (viewFilterResults is just one of the views): CGFloat heightSearchBar = CGRectGetHeight(_searchBar.frame); [UIView animateWithDuration:animationDuration…
Paul T.
  • 4,938
  • 7
  • 45
  • 93
0
votes
1 answer

"Implicit conversion from enumeration type" for animateWithDuration

When trying to make an animation in UIView it says 'implicit conversion from enumeration type' My code is: [UIView animateWithDuration:0.5 delay:0 options:UIViewAnimationCurveEaseIn animations:^{ [pea setFrame:CGRectMake(82, 224, 35, 35)]; }…
0
votes
1 answer

animateWithDuration can't fade in and out

I want to preform a fade out followed by a fade in on my label, i can get both to work separately but not together. [UILabel animateWithDuration:1.0 animations:^{ _swixValla.alpha = 0.0; _skigoValla.alpha = 0.0; …
user2049921
  • 81
  • 1
  • 8
-1
votes
2 answers

animateWithDuration() stops after app exit

I've incorporated a glow effect into my UIButtons, (code taken from https://github.com/bc-oscar/Glowing-UIButton). The code is in a separate swift file and the buttons are defined in the view controller as being of type 'GlowingButton', and changed…
Tim
  • 583
  • 1
  • 6
  • 18
-1
votes
1 answer

How to removeFromSuperview from AppDelegate after 3 seconds in Swift

When I receive a push notification when app is active I create an UIView that appears. The issue is that view doesn't disspear but it stays there forever. This is the code: func application(application: UIApplication,…
A. Sola
  • 107
  • 1
  • 12
-1
votes
1 answer

How To Only Animate Contents of UIImageView

How do you animate only the contents of a UIImageView? If the image view is centered in the middle of the screen how do you animate the image to slide in from the left but only be shown within the frame of the image view? As if you are looking at a…
Max Phillips
  • 6,991
  • 9
  • 44
  • 71
1 2 3
10
11