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: Sources/PillboxView/PillView.swift
+20-3Lines changed: 20 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -21,7 +21,7 @@ public class PillView {
21
21
22
22
/// The height of the ``PillboxView/PillView/pillView``.
23
23
///
24
-
/// If a `UINavigationController` obstructs it, then add `45` to the `y` value when the ``PillboxView/PillView/pillView`` completes the animation sliding in. This will be addressed shortly in the future
24
+
/// If a `UINavigationController` obstructs it, then set ``PillboxView/PillView/isNavigationControllerPresent`` to `true`
25
25
publicvarheight=45
26
26
27
27
/// A `UIActivityIndicatorView` for the asynchronous task of the ``PillboxView/PillShowType/ongoingTask``.
@@ -73,6 +73,12 @@ public class PillView {
73
73
/// This is set automatically, and cannot be changed. This could come handy when you would want to filter out a specific case from the ``PillboxView/PillView/activePillBoxViews``.
74
74
publicprivate(set)varshowType:PillShowType?=nil
75
75
76
+
/// A Boolean value to allowing ``PillboxView/PillView`` to work around having a `UINavigationController` at the top of the screen.
77
+
///
78
+
/// The `UINavigationController` can block the top of the screen, thus obstructing the ``PillboxView/PillView/pillView``
79
+
/// Set this to true to let the ``PillboxView/PillView/pillView`` ``PillboxView/PillView/reveal(animated:completionHandler:)`` 40 pixels higher (y-axis, lower down on the screen from the top).
80
+
publicvarisNavigationControllerPresent=Bool()
81
+
76
82
/// The `Set` holds unique ``PillboxView/PillView`` shown on the screen at the given time.
77
83
///
78
84
/// When ``PillboxView/PillView`` exit the screen, they are removed from this `Set`. There are numerous use cases for this:
@@ -99,6 +105,14 @@ public class PillView {
99
105
self.showType = showType
100
106
}
101
107
108
+
/// Initialize this value overriding the ``PillboxView/PillView/isNavigationControllerPresent`` value
109
+
/// - Parameter isNavigationControllerPresent: A Boolean value to allowing ``PillboxView/PillView`` to work around having a `UINavigationController` at the top of the screen.
0 commit comments