How to make a dynamically changing user interface design for iOS?

I am using Xcode 9.2 and Swift 4.0, and I am looking for a legal and modern way to draw a dynamically changing interface for an iOS application. For example, please look at these photos (if the blue view is hidden or disappears, then the red view should occupy the entire screen):

enter image description here enter image description here

And the next question, I want it to move smoothly, like an animation. So the question is, what technologies exist to implement a dynamically changing interface for iOS?

I will be grateful for any help, answer or advice.

EDIT: I'm looking for a way to create design and hardness of any type. I mean the right, modern technology.

An example of my current design:

enter image description here

. , .

+1
3

. 2 . 5.

enter image description here

, .

class ViewController: UIViewController {

  @IBOutlet var redView: UIView!
  @IBOutlet var blueView: UIView!

   @IBAction func hideBtnAction(_ sender: UIButton) {
     UIView.animate(withDuration: 3) {
      self.blueView.isHidden = true
     }
   }
}

enter image description here

+2

stackView, , , ,

self.stackView.removeArrangedSubview(blueView)
0

You can use KVO for Autolayout restrictions and change accordingly.

0
source

Source: https://habr.com/ru/post/1693191/


All Articles