GMSMapView resize - strange flicker/blink effect

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP


GMSMapView resize - strange flicker/blink effect



I have a subview including GMSMapView in my controller - initially it's collapsed and takes just a part of screen - then a user can expand it and see the map in fullscreen mode.
The code below works however there is a strange flicker at the end of the animation
Here is my code:


let screenHeight = screenSize.height
let proportionalHeight = (screenSize.width * 46.0 ) / 75.0
mapViewHeight.constant = !isMapFullscreen ? screenHeight : proportionalHeight

UIView.animate(withDuration: 1.0, delay: 0,
usingSpringWithDamping: 0.9,
initialSpringVelocity: 0,
options: UIViewAnimationOptions.curveEaseInOut,
animations: {
self.view.layoutIfNeeded()

},
completion: { finished in
if finished {
self.isMapFullscreen = !self.isMapFullscreen
}
})



video









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Popular posts from this blog

Visual Studio Code: How to configure includePath for better IntelliSense results

Spring cloud config client Could not locate PropertySource

Makefile test if variable is not empty