Questions tagged [uiviewanimation]

There is no default class called UIViewAnimation, this tag refers to methods that perform animation on UIView objects.

includes a number of different ways to perform animations. One of the simplest is to use the animation support in the UIView class.

Prior to iOS 4, the only way to do UIView animation was with beginAnimations:context/commitAnimations. Those methods are discouraged in iOS 4 and later.

For iOS versions greater than 4.0, you should use the new UIView class methods whose names start with animateWithDuration:

1798 questions
15
votes
2 answers

Get current position of animated scrollview

i got the following problem. i subclassed a uiscrollview which contentOffset is animated by this code: [UIView animateWithDuration:1.0 delay:1.0 options:options animations:^{ …
philipp
  • 151
  • 1
  • 1
  • 4
15
votes
1 answer

SubView slide in animation, iphone

I have a UIview Containing two UIButtons. -(void)ViewDidLoad { geopointView = [[UIView alloc] initWithFrame:CGRectMake(0, 350, 120, 80)]; geopointView.backgroundColor = [UIColor greenColor]; UIButton *showGeoPointButton = [[UIButton…
alekhine
  • 1,600
  • 4
  • 20
  • 45
15
votes
2 answers

How do I control the background color during the iPhone flip view animation transition?

I have some pretty standard flipping action going on: [UIView beginAnimations:@"swapScreens" context:nil]; [UIView setAnimationTransition:UIViewAnimationTransitionFlipFromLeft forView:self.view cache:YES]; [UIView…
Rob S.
  • 426
  • 4
  • 16
15
votes
2 answers

Synchronizing Animations in keyboardWillShow keyboardWillHide -- Hardware Keyboard & Virtual Keyboard Simultaneously

Preamble So I have an application featuring a chat section, and I'm synchronizing the animation of the keyboard hiding and showing with the rise and fall of the chat input. Here's the code I'm using: SHOW: - (void)…
Logan
  • 52,262
  • 20
  • 99
  • 128
14
votes
1 answer

How to animate UIImageViews like hatch doors opening

I'm trying to create an animation that would look like 2 french doors (or 2 hatch doors) opening towards the user. I tried using the built in UIViewAnimationOptionTransitionFlipFromRight transition, but the origin of the transition seems to be the…
wes
  • 1,643
  • 2
  • 15
  • 12
14
votes
2 answers

UIView block animation move view left to right and back to left

I wan't to animate a view that's shaped as an arrow, and I want it to animate from left to right, left to right and so on.. This code below is not working, I'm guessing I need a path, but don't know how to do that in a UIView block animation. …
the Reverend
  • 12,305
  • 10
  • 66
  • 121
14
votes
1 answer

How to force a raw value of 7 into a UIViewAnimationCurve enum?

The key UIKeyboardAnimationCurveUserInfoKey in the userInfo dictionary of a UIKeyboardWillShowNotification contains an Int with the value 7. Now I need to pass this Int into UIView.setAnimationCurve(). I tried to create the required…
Sebastian Kirsche
  • 861
  • 2
  • 19
  • 36
14
votes
1 answer

How to animate removeFromSuperview

I animated the appearance of my subview with: CATransition *transition = [CATransition animation]; transition.duration = 0.3; transition.type = kCATransitionReveal; [webView.layer addAnimation:transition forKey:nil]; [self.view…
Jakub
  • 13,712
  • 17
  • 82
  • 139
14
votes
5 answers

Find out the animation duration of the current animation block

Inside a UIView animation block, is there a way to get the current animation's duration? [UIView animateWithDuration:1.0 animations:^{ // float duration = ? }];
adamsiton
  • 3,642
  • 32
  • 34
13
votes
2 answers

UITableView editing animation duration

Does any one know how long the animation - (void)setEditing:(BOOL)editing animated:(BOOL)animated; in the UITableViewCell takes? I´m testing with 0.5 seconds but i´d rather like to use a constant from the Framework somthing like…
volkersfreunde
  • 1,095
  • 1
  • 12
  • 22
13
votes
5 answers

iPhone Flip Animation using UIViewAnimationTransitionFlipFromLeft in landscape mode

I am working on one iPhone application in which I implemented one animation UIViewAnimationTransitionFlipFromLeft. Here my application works fine in the Portrait mode. It is doing the same animation as specified means Flip from Left to Right. But…
13
votes
5 answers

Swift animate UIView with multiple options

How does swift handle multiple options when animating UIView? I tried UIView.animateWithDuration(0.2, delay: 0.0, options: .Repeat | .Autoreverse, animations: {self.alpha = 0.0}, completion: nil) but seems to confuse the | with a bitwise…
Hristo
  • 6,382
  • 4
  • 24
  • 38
12
votes
3 answers

Subclassing UIButton and overriding touch events - not working

I need a scale spring animation for all my buttons in a project. So i subclassed UIButton and override touch event functions. import UIKit class UIAnimatedButton: UIButton { override func touchesBegan(touches: Set, withEvent event:…
ilan
  • 4,402
  • 6
  • 40
  • 76
12
votes
3 answers

Weird animations when changing NavigationItem prompt

I have these ViewControllers added in storyboard: None is connected with a custom class, everything is from pure storyboard. Video on iPhone simulator on iOS7 This only happens when using AutoLayout on iOS7. Anyone else seen this? Download sample…
Arbitur
  • 38,684
  • 22
  • 91
  • 128
12
votes
5 answers

Is there a way to animate changing a UILabel's textAlignment?

I am using iOS 7 and I am trying to move a label that is centered off to the left of my view. Currently I am trying to do this by changing how my UILabel is aligned, and I am trying to animate it in the process. I am currently calling the…
lehn0058
  • 19,977
  • 15
  • 69
  • 109