Skip to content

Commit 32ca9de

Browse files
committed
disableAutoHide -> autoHideDisabled
1 parent d162f96 commit 32ca9de

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Documentation/Compass/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Compass:
5050
`Compass` has the following modifiers:
5151

5252
- `func compassSize(size: CGFloat)` - The size of the `Compass`, specifying both the width and height of the compass.
53-
- `func disableAutoHide(_:)` - Specifies whether the ``Compass`` should automatically hide when the heading is 0.
53+
- `func autoHideDisabled(_:)` - Specifies whether the ``Compass`` should automatically hide when the heading is 0.
5454

5555
## Behavior:
5656

Sources/ArcGISToolkit/Components/Compass/Compass.swift

+1-1
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public extension Compass {
136136
/// Specifies whether the ``Compass`` should automatically hide when the heading is 0.
137137
/// - Parameter disable: A Boolean value indicating whether the compass should automatically
138138
/// hide/show itself when the heading is `0`.
139-
func disableAutoHide(_ disable: Bool = true) -> some View {
139+
func autoHideDisabled(_ disable: Bool = true) -> some View {
140140
var copy = self
141141
copy.autoHide = !disable
142142
return copy

Tests/ArcGISToolkitTests/CompassTests.swift

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ final class CompassTests: XCTestCase {
2525
var _viewpoint: Viewpoint? = makeViewpoint(rotation: initialValue)
2626
let viewpoint = Binding(get: { _viewpoint }, set: { _viewpoint = $0 })
2727
let compass = Compass(viewpoint: viewpoint)
28-
.disableAutoHide() as! Compass
28+
.autoHideDisabled() as! Compass
2929
XCTAssertFalse(compass.shouldHide)
3030
_viewpoint = makeViewpoint(rotation: finalValue)
3131
XCTAssertFalse(compass.shouldHide)
@@ -54,7 +54,7 @@ final class CompassTests: XCTestCase {
5454
/// `false`.
5555
func testAutomaticallyHidesNoAutoHide() {
5656
let compass = Compass(viewpoint: .constant(nil))
57-
.disableAutoHide() as! Compass
57+
.autoHideDisabled() as! Compass
5858
XCTAssertFalse(compass.shouldHide)
5959
}
6060

@@ -67,7 +67,7 @@ final class CompassTests: XCTestCase {
6767
/// Verifies that the compass correctly initializes when given only a viewpoint.
6868
func testInitWithViewpointAndAutoHide() {
6969
let compass = Compass(viewpoint: .constant(makeViewpoint(rotation: .zero)))
70-
.disableAutoHide() as! Compass
70+
.autoHideDisabled() as! Compass
7171
XCTAssertFalse(compass.shouldHide)
7272
}
7373
}

0 commit comments

Comments
 (0)