function:
func setView(view: UIView, hidden: Bool) {
UIView.transition(with: view, duration: 0.5, options: .transitionCrossDissolve, animations: { _ in
view.isHidden = hidden
}, completion: nil)
}
usage:
usage:
@IBOutlet weak var updateprofileview: UIView!
@IBAction func updateProfileViewAction(_ sender: Any) {
if updateprofileview.isHidden {
setView(view: updateprofileview, hidden: false)
} else {
setView(view: updateprofileview, hidden: true)
}
}
note: design view in stack view
note: design view in stack view
No comments:
Post a Comment