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
7
votes
3 answers

Is there a way to use UIViewAnimationOptionTransitionCurlUp without it animating the entire screen?

I have a view controller that has the following hierarchy: UIViewController | |-view     |-presentView (UIView)     |-stagedView (UIView)     |-UIToolbar I am using the transitionFromView:toView:duration:options:completion: method to animate a page…
Wayne Hartman
  • 18,369
  • 7
  • 84
  • 116
7
votes
1 answer

UIView touchesbegan doesn't respond during animation

I have a draggable class that inherits UIImageView. The drag works fine when the view is not animating. But when animating it won't respond to touches. Once the animation is completed the touch works again. But I need it to pause the animation on…
coder
  • 4,121
  • 14
  • 53
  • 88
7
votes
4 answers

Break a loop inside an animation block

I'm trying to break a for-loop after a completed UIView animation. Here is the following snippet: public func greedyColoring() { let colors = [UIColor.blue, UIColor.green, UIColor.yellow, UIColor.red, UIColor.cyan, UIColor.orange,…
SaifDeen
  • 862
  • 2
  • 16
  • 33
7
votes
2 answers

How can blurriness of UIVisualEffectView be modified while dragging in iOS?

Currently, I'm using a UIVisualEffectView to apply a blur to an image. I have a UIScrollView. As I pull down on the scrollView, in my "scrollViewDidScroll" method, I'm changing the alpha of the UIVisualEffectView. The current behavior of this is…
Dan Morrow
  • 4,433
  • 2
  • 31
  • 45
7
votes
2 answers

Ultravisual iOS application like animation using UICollectionViewLayout without overlapping of images

I have created the same component which currently available in UltraVisual iOS application for viewing the records in animation like parallax effects. Please find the below attached GIF image for more information. I want the same animation as in…
7
votes
3 answers

Animate `backgroundColor` of a `UIView` that implements `drawRect`

I have a custom UIView and I would like to animate its backgroundColor property. This is an animatable property of a UIView. This is the code: class ETTimerUIView: UIView { required init(coder aDecoder: NSCoder) { super.init(coder: aDecoder) …
SimplGy
  • 20,079
  • 15
  • 107
  • 144
7
votes
1 answer

UIView Animation in Swift not working, wrong arguments error

I'm trying to do an animation and used the below code. I'm getting "Cannot invoke 'animateWithDuration' with an argument list of type '(FloatLiteralConvertible, delay: FloatLiteralConvertible, options: UIViewAnimationOptions, animations: () -> () ->…
7
votes
1 answer

Animating constraints causing subviews layout to be visible on screen

I have a messaging screen I am creating and I am almost done it. I built most of the views with nib files and constraints. I have one small bug however where I can visually see some of the cells laying themselves out when the keyboard dismisses…
DBoyer
  • 3,062
  • 4
  • 22
  • 32
7
votes
4 answers

Autolayout and Facebook Pop

Is there currently a way to use the Facebook Pop framework with auto-layout or do you have to use springs and struts? I keep reading that it is possible, but I don't know what the syntax is to be able to animate a view's top constraint.
Endama
  • 743
  • 8
  • 25
7
votes
3 answers

UIViewAnimationOptionBeginFromCurrentState unexpected behaviour with basic animation

I am trying to perform this basic UIView animation upon receiving a button click: - (IBAction)buttonPress:(id)sender { self.sampleView.alpha = 0.0; [UIView animateWithDuration:2.0 delay:0.0 …
Mike M
  • 83
  • 1
  • 4
7
votes
2 answers

Flickering during custom view controller transition iOS 7

I'm trying to do a very simple transition: one view moves half the screen to the left while the second ("to") view moves in half a screen. I have the animation working, but when I reverse the animation, I see a flickering. The "to" view (i.e. the…
Mark
  • 6,647
  • 1
  • 45
  • 88
7
votes
1 answer

Animation in UISlider is skipped on iOS 7

I have a slider that is functioning as 2 sliders, according to the audio played - when 1 type of audio (some kind of vocal guidance) is disabled, a music is played, and the slider controls the music's volume. When changing roles, the slider changes…
Dan
  • 872
  • 10
  • 24
7
votes
2 answers

Why is this simple animation not working on iOS 7?

In my project I have a simple animation, I just move a view from left to right. This works fine in iOS 6, but when I run in iOS 7 it does not do anything. Does someone know why? If the animation is very simple how can I fix this for iOS 7? My code…
user_Dennis_Mostajo
  • 2,279
  • 4
  • 28
  • 38
7
votes
6 answers

How to hide/show UIView with animation in iPhone

I want to show UIView after button pressed with animation,I can show the view but I am unable to hide it again pressed that button.Here is my code to show/hide the view. To Show the UIView : sliderView.frame = CGRectMake(130, 20, 0, 0); …
user2586519
  • 250
  • 1
  • 6
  • 18
7
votes
2 answers

How do I redraw a UIView's sublayers as I'm animating the UIView's bounds?

I have a UIView with several custom-drawed sublayers (a few CAGradientLayers with CAShapeLayer masks, etc.). I'm using the UIView animation method to animate it's bounds (increasing both its width and height). [UIView animateWithDuration:2 delay:0…
zakdances
  • 22,285
  • 32
  • 102
  • 173