Questions tagged [ios-animations]

Animations provide fluid visual transitions between different states of your user interface.

Animations

Animations provide fluid visual transitions between different states of your user interface. In iOS, animations are used extensively to reposition views, change their size, remove them from view hierarchies, and hide them. You might use animations to convey feedback to the user or to implement interesting visual effects.

In iOS, creating sophisticated animations does not require you to write any drawing code. All of the animation techniques described in this chapter use the built-in support provided by Core Animation. All you have to do is trigger the animation and let Core Animation handle the rendering of individual frames. This makes creating sophisticated animations very easy with only a few lines of code.

Official Documentation

188 questions
0
votes
1 answer

Animation not working when disappearing, but works when appearing

I'm trying to make a button appear and disappear (animated). When appearing, it animates. But when the button is supposed to disappear it doesn't animate, it just goes away. anybody any idea why when it appears it animates, but when it disappears it…
Thomas V
  • 65
  • 10
0
votes
1 answer

How To Transition Between Subviews While Being In The Same viewController without Navigation Controller?

I am new in iOS development. I would like to code a page with help of UIKit that I can switch between subviews (by clicking radio button)with decent animation (like shown in this video: https://www.youtube.com/watch?v=ZXXWkieFzN8). However, I have…
Huseyn
  • 39
  • 7
0
votes
1 answer

SwiftUI onTapGesture called only once

I am working on this audio player with multiple view components in it. I added a way to hide/show the top view and the bottom view when we click anywhere in the middle view. Before it was working fine, but recently when I tried again, it only…
Oleg G.
  • 550
  • 5
  • 25
0
votes
1 answer

Change label background color using animation in iOS

I am trying to show an animated n number of level. There is n number of levels under UIStackView. What I want: Using animation First, change the label 4's background color Second, change the label 3's background color Third, change the label 7's…
0
votes
0 answers

Keep getting the user speed network connection in Swift

I am building out a feature in the app where I have to know the speed connection of the user and draw out a line illustrating the connection speed. I found multiple posts on StackOverflow showing how to get the speed for one time. But the problem is…
Mutaeb Alqahtani
  • 354
  • 4
  • 13
0
votes
1 answer

How to Apply Animation while changing UIView size? + Swift 5

Im new to IOS development and I have two buttons in the UIView and when user select the option portrait or landscape, change the UIView re-size and change the background color as well and i need to add animation for that process. As as ex: User…
0
votes
0 answers

Scenekit - several overlay screens

Yesterday, I posted this question from an iPad and realized that it worked out terribly. So today I post it again, hoping to get better across what my problem is. I am writing a 3D game app, using SceneKit to display the entire scene and a SpriteKit…
ULI
  • 41
  • 7
0
votes
1 answer

Receiving issue: Could not cast value of type 'UIViewController' trying to animate on Xcode

override func prepare(for segue: UIStoryboardSegue, sender: Any?) { let secondVC = segue.destination as! SettingsViewController //error is marked here secondVC.transitioningDelegate = self secondVC.modalPresentationStyle =…
Stryka
  • 39
  • 4
0
votes
2 answers

Adding Subviews in a loop displays all the subvies at a time

I'm trying to add 1000 UI labels on a button click but I'm looping for 1000 times and creating 1000 UI label @IBAction func display(_ sender: Any) { for i in Range(1...1000) { let label = self.displayLabel(str:…
Mahi Tej Gvp
  • 984
  • 1
  • 14
  • 34
0
votes
1 answer

CAShapeLayer animation issue

I have a CAShapeLayer (below) which is used to draw a bubble. Which all works fine, as per designs but when i start resizing it within a tableView with tableView.beginUpdates() and tableView.endUpdates(). I end up having the old layer in black…
RicardoDuarte
  • 728
  • 7
  • 23
0
votes
1 answer

Swift spring animation is not working properly on a UITableViewCell

I have already read some issues and not properly uses about spring animations in Swift but I am a little bit confused about this case. I have a ViewController which has a UITableView. I would like to add some little spring bouncing animation to its…
0
votes
1 answer

How to read keyPath value after animation?

I'm animating show and hide of my FAB button, however I want to prevent showing FAB if it is already shown. How to read current layer scale? func hideFab(){ let materialCurve = MDCAnimationTimingFunction.deceleration let timingFunction =…
0
votes
1 answer

Swift tvOS - pause UIImage animations when user presses MENU button

For my intro page I have multiple images animations in sync with music to make a cool intro page. Problem is when I tap MENU and return to the app, all of the animations have completed. I have implemented a function to pause the music, yet need to…
Lukas Bimba
  • 817
  • 14
  • 35
0
votes
1 answer

UIButton not highlighting on tap Swift

Introduction I created a button and added subviews to it / gave it a custom look. As subclassing buttons is a lot of pain, I decided to do it (yeah, I know it's bad) inside my view controller and creating an extension for UIButton which styles…
linus_hologram
  • 1,595
  • 13
  • 38
0
votes
1 answer

Activating an animation in SwiftUI automatically based on saved state

I'm trying to write a view that displays 3 buttons, I cannot get the animation to start on load. When a button is tapped, I want it to animate until either: it is tapped a second time another of the 3 buttons is tapped I have got the code working…
Tomm P
  • 761
  • 1
  • 8
  • 19