Create your own pull up controller with multiple sticky points like in iOS Maps.
pod 'PullUpController'
to your Podfile or copy PullUpController.swift
into your projectPullUpController
addPullUpController(<#T##PullUpController#>, initialStickyPointOffset: <#T##CGFloat#>, animated: <#T##Bool#>)
You can customize the controller behavior by overriding the followings properties:
pullUpControllerPreferredSize: CGSize
The desired size of the pull up controller’s view, in screen units.
The default value is width:
UIScreen.main.bounds.width, height: 400
.
pullUpControllerPreferredLandscapeFrame: CGRect
The desired size of the pull up controller’s view, in screen units when the device is in landscape mode.
The default value is
(x: 10, y: 10, width: 300, height: UIScreen.main.bounds.height - 20)
.
pullUpControllerMiddleStickyPoints: [CGFloat]
A list of y values, in screen units expressed in the pull up controller coordinate system.
At the end of the gestures the pull up controller will scroll to the nearest point in the list.
For a complete list of all the sticky points you can use
pullUpControllerAllStickyPoints
#maps #ios