You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15-14Lines changed: 15 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,19 +17,19 @@ Create your own pull up controller with multiple sticky points like in iOS Maps
17
17
# Setup
18
18
1. Add `pod 'PullUpController'` to your Podfile or copy `PullUpController.swift` into your project
19
19
2. Make sure the view controller that will be your pull up controller inherits from `PullUpController`
20
-
3. Add the controller as child of your main controller using `addPullUpController(<#T##PullUpController#>)`
20
+
3. Add the controller as child of your main controller using `addPullUpController(<#T##PullUpController#>, initialStickyPointOffset: <#T##CGFloat#>, animated: <#T##Bool#>)`
21
21
22
22
# Customization
23
23
You can customize the controller behavior by overriding the followings properties:
24
24
25
-
`pullUpControllerPreviewOffset: CGFloat`
26
-
>The desired height in screen units expressed in the pull up controller coordinate system that will be initially showed.
27
-
>The default value is ```50```
28
-
29
25
`pullUpControllerPreferredSize: CGSize`
30
26
>The desired size of the pull up controller’s view, in screen units.
31
27
>The default value is width: `UIScreen.main.bounds.width, height: 400`.
32
28
29
+
`pullUpControllerPreferredLandscapeFrame: CGRect`
30
+
>The desired size of the pull up controller’s view, in screen units when the device is in landscape mode.
31
+
>The default value is `(x: 10, y: 10, width: 300, height: UIScreen.main.bounds.height - 20)`.
32
+
33
33
`pullUpControllerMiddleStickyPoints: [CGFloat]`
34
34
>A list of y values, in screen units expressed in the pull up controller coordinate system.
35
35
>At the end of the gestures the pull up controller will scroll to the nearest point in the list.
@@ -39,19 +39,11 @@ You can customize the controller behavior by overriding the followings propertie
39
39
>
40
40
>For a complete list of all the sticky points you can use `pullUpControllerAllStickyPoints`
41
41
42
-
`pullUpControllerAllStickyPoints: [CGFloat]`
43
-
>A list of y values, in screen units expressed in the pull up controller coordinate system.
44
-
>At the end of the gesture the pull up controller will scroll at the nearest point in the list.
45
-
46
42
`pullUpControllerIsBouncingEnabled: Bool`
47
43
>A Boolean value that determines whether bouncing occurs when scrolling reaches the end of the pull up controller's view size.
48
44
>The default value is `false`.
49
45
50
-
`pullUpControllerPreferredLandscapeFrame: CGRect`
51
-
>The desired size of the pull up controller’s view, in screen units when the device is in landscape mode.
52
-
>The default value is `(x: 10, y: 10, width: 300, height: UIScreen.main.bounds.height - 20)`.
53
-
54
-
It's possible to change the view controller's view position by using the method
46
+
It's possible to change the view controller's view position programmatically by using the method
>This method will move the pull up controller's view in order to show the provided visible point.
@@ -60,6 +52,15 @@ It's possible to change the view controller's view position by using the method
60
52
>-`visiblePoint`: the y value to make visible, in screen units expressed in the pull up controller coordinate system.
61
53
>-`completion`: The closure to execute after the animation is completed. This block has no return value and takes no parameters. You may specify nil for this parameter.
62
54
55
+
By overriding the following method it is possible to customize all the animations performed by the controller's view.
PullUpController is easy draggable even if your `PullUpController`'s view contains a `UIScrollView`, just attach it to the controller itself with the following method:
0 commit comments