@IBAction func toggleMenuButton(_ sender:UIButton?) {
if btnMenu.tag == 0 {
self.btnMenu.tag = 1
UIView.animate(withDuration: 0.3, animations: {
self.btnShuffel.center = self.btnMenu.center
self.btnFavorite.center = self.btnMenu.center
self.btnRepeat.center = self.btnMenu.center
self.btnShuffel.alpha = 0
self.btnFavorite.alpha = 0
self.btnRepeat.alpha = 0
})
}
else {
self.btnMenu.tag = 0
UIView.animate(withDuration: 0.3, animations: {
self.btnShuffel.center = self.btnShuffelPosition
self.btnFavorite.center = self.btnFavoritePosition
self.btnRepeat.center = self.btnRepeatPosition
self.btnShuffel.alpha = 1
self.btnFavorite.alpha = 1
self.btnRepeat.alpha = 1
})
}
}
-
Notifications
You must be signed in to change notification settings - Fork 0
iCoder86/MenuAnimation
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description or website provided.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published