Skip to content

Commit

Permalink
Merge pull request #7 from spacenation/modal-crash-fix
Browse files Browse the repository at this point in the history
Accent color crash fix
  • Loading branch information
ay42 authored Mar 12, 2020
2 parents c603297 + ce4375e commit 61a47ef
Show file tree
Hide file tree
Showing 7 changed files with 19 additions and 33 deletions.
32 changes: 9 additions & 23 deletions Examples/SlidersExamples.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@
FA0D8A37231E221300434037 /* HorizontalSliderExamplesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA0D8A35231E221300434037 /* HorizontalSliderExamplesView.swift */; };
FA0D8A39231E231D00434037 /* VerticalSliderExamplesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA0D8A38231E231D00434037 /* VerticalSliderExamplesView.swift */; };
FA0D8A3A231E231D00434037 /* VerticalSliderExamplesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA0D8A38231E231D00434037 /* VerticalSliderExamplesView.swift */; };
FA493848241A13F700830AB0 /* Sliders in Frameworks */ = {isa = PBXBuildFile; productRef = FA493847241A13F700830AB0 /* Sliders */; };
FA5592562319EDD700FD07E2 /* HalfCapsule.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA5592552319EDD700FD07E2 /* HalfCapsule.swift */; };
FA5592572319EDD700FD07E2 /* HalfCapsule.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA5592552319EDD700FD07E2 /* HalfCapsule.swift */; };
FA61E9B6231365E3006A5B6B /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA61E9B5231365E3006A5B6B /* AppDelegate.swift */; };
FA61E9B8231365E3006A5B6B /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA61E9B7231365E3006A5B6B /* ContentView.swift */; };
FA61E9BA231365E5006A5B6B /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FA61E9B9231365E5006A5B6B /* Assets.xcassets */; };
FA61E9BD231365E5006A5B6B /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = FA61E9BC231365E5006A5B6B /* Preview Assets.xcassets */; };
FA61E9C0231365E5006A5B6B /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = FA61E9BE231365E5006A5B6B /* Main.storyboard */; };
FA61E9CA23136A48006A5B6B /* Sliders in Frameworks */ = {isa = PBXBuildFile; productRef = FA61E9C923136A48006A5B6B /* Sliders */; };
FA61E9CC23136A50006A5B6B /* Sliders in Frameworks */ = {isa = PBXBuildFile; productRef = FA61E9CB23136A50006A5B6B /* Sliders */; };
FA66B3802356586D00AB542A /* Sliders in Frameworks */ = {isa = PBXBuildFile; productRef = FA66B37F2356586D00AB542A /* Sliders */; };
FA815111234ABFC100E3AFA3 /* Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA815110234ABFC100E3AFA3 /* Model.swift */; };
FA815112234ABFC100E3AFA3 /* Model.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA815110234ABFC100E3AFA3 /* Model.swift */; };
FAA6C40423529AD5002C8FCD /* PointSliderExamplesView.swift in Sources */ = {isa = PBXBuildFile; fileRef = FAA6C40323529AD5002C8FCD /* PointSliderExamplesView.swift */; };
Expand Down Expand Up @@ -64,16 +62,14 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
FA61E9CC23136A50006A5B6B /* Sliders in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
FAF1C03022ED3B7D00F92FEA /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
FA61E9CA23136A48006A5B6B /* Sliders in Frameworks */,
FA66B3802356586D00AB542A /* Sliders in Frameworks */,
FA493848241A13F700830AB0 /* Sliders in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -182,7 +178,6 @@
);
name = "SlidersExamples macOS";
packageProductDependencies = (
FA61E9CB23136A50006A5B6B /* Sliders */,
);
productName = "RangeSliderExamples macOS";
productReference = FA61E9B3231365E3006A5B6B /* SlidersExamples macOS.app */;
Expand All @@ -202,8 +197,7 @@
);
name = "SlidersExamples iOS";
packageProductDependencies = (
FA61E9C923136A48006A5B6B /* Sliders */,
FA66B37F2356586D00AB542A /* Sliders */,
FA493847241A13F700830AB0 /* Sliders */,
);
productName = "RangeSliderExamples iOS";
productReference = FAF1C03322ED3B7D00F92FEA /* SlidersExamples iOS.app */;
Expand Down Expand Up @@ -236,7 +230,7 @@
);
mainGroup = FAF1C02722ED3AD500F92FEA;
packageReferences = (
FA66B37E2356586D00AB542A /* XCRemoteSwiftPackageReference "Sliders" */,
FA493846241A13F700830AB0 /* XCRemoteSwiftPackageReference "swiftui-sliders" */,
);
productRefGroup = FAF1C03422ED3B7D00F92FEA /* Products */;
projectDirPath = "";
Expand Down Expand Up @@ -721,28 +715,20 @@
/* End XCConfigurationList section */

/* Begin XCRemoteSwiftPackageReference section */
FA66B37E2356586D00AB542A /* XCRemoteSwiftPackageReference "Sliders" */ = {
FA493846241A13F700830AB0 /* XCRemoteSwiftPackageReference "swiftui-sliders" */ = {
isa = XCRemoteSwiftPackageReference;
repositoryURL = "git@github.com:SwiftUIExtensions/Sliders.git";
repositoryURL = "https://github.com/spacenation/swiftui-sliders.git";
requirement = {
kind = upToNextMajorVersion;
minimumVersion = 0.9.9;
minimumVersion = 0.1.0;
};
};
/* End XCRemoteSwiftPackageReference section */

/* Begin XCSwiftPackageProductDependency section */
FA61E9C923136A48006A5B6B /* Sliders */ = {
FA493847241A13F700830AB0 /* Sliders */ = {
isa = XCSwiftPackageProductDependency;
productName = Sliders;
};
FA61E9CB23136A50006A5B6B /* Sliders */ = {
isa = XCSwiftPackageProductDependency;
productName = Sliders;
};
FA66B37F2356586D00AB542A /* Sliders */ = {
isa = XCSwiftPackageProductDependency;
package = FA66B37E2356586D00AB542A /* XCRemoteSwiftPackageReference "Sliders" */;
package = FA493846241A13F700830AB0 /* XCRemoteSwiftPackageReference "swiftui-sliders" */;
productName = Sliders;
};
/* End XCSwiftPackageProductDependency section */
Expand Down
4 changes: 2 additions & 2 deletions Sources/Sliders/Base/Point/PointSlider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public struct PointSlider<V, TrackView: View, ThumbView : View>: View where V :
return GeometryReader { geometry in
ZStack(alignment: .leading) {
if self.configuration.options.contains(.interactiveTrack) {
self.track
self.track.accentColor(.accentColor)
.gesture(
DragGesture(minimumDistance: 0)
.onChanged { gestureValue in
Expand Down Expand Up @@ -57,7 +57,7 @@ public struct PointSlider<V, TrackView: View, ThumbView : View>: View where V :
}
)
} else {
self.track
self.track.accentColor(.accentColor)
}

ZStack {
Expand Down
2 changes: 1 addition & 1 deletion Sources/Sliders/Base/Range/HorizontalRangeSlider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public struct HorizontalRangeSlider<V, TrackView: View, LowerThumbView: View, Up

return GeometryReader { geometry in
ZStack(alignment: .leading) {
self.track
self.track.accentColor(.accentColor)

ZStack {
self.lowerThumb
Expand Down
2 changes: 1 addition & 1 deletion Sources/Sliders/Base/Range/VerticalRangeSlider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public struct VerticalRangeSlider<V, TrackView: View, LowerThumbView: View, Uppe

return GeometryReader { geometry in
ZStack {
self.track
self.track.accentColor(.accentColor)

ZStack {
self.lowerThumb
Expand Down
4 changes: 2 additions & 2 deletions Sources/Sliders/Base/Value/HorizontalValueSlider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public struct HorizontalValueSlider<V, TrackView: View, ThumbView : View>: View
return GeometryReader { geometry in
ZStack(alignment: .leading) {
if self.configuration.options.contains(.interactiveTrack) {
self.track
self.track.accentColor(.accentColor)
.gesture(
DragGesture(minimumDistance: 0)
.onChanged { gestureValue in
Expand All @@ -42,7 +42,7 @@ public struct HorizontalValueSlider<V, TrackView: View, ThumbView : View>: View
}
)
} else {
self.track
self.track.accentColor(.accentColor)
}

ZStack {
Expand Down
4 changes: 2 additions & 2 deletions Sources/Sliders/Base/Value/VerticalValueSlider.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public struct VerticalValueSlider<V, TrackView: View, ThumbView : View>: View wh
return GeometryReader { geometry in
ZStack(alignment: .bottom) {
if self.configuration.options.contains(.interactiveTrack) {
self.track
self.track.accentColor(.accentColor)
.gesture(
DragGesture(minimumDistance: 0)
.onChanged { gestureValue in
Expand All @@ -41,7 +41,7 @@ public struct VerticalValueSlider<V, TrackView: View, ThumbView : View>: View wh
}
)
} else {
self.track
self.track.accentColor(.accentColor)
}

ZStack {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public struct HorizontalValueSliderStyle<Track: View>: ValueSliderStyle {
GeometryReader { geometry in
ZStack(alignment: .leading) {
if self.options.contains(.interactiveTrack) {
self.track(configuration.value.wrappedValue)
self.track(configuration.value.wrappedValue).accentColor(.accentColor)
.gesture(
DragGesture(minimumDistance: 0)
.onChanged { gestureValue in
Expand All @@ -30,7 +30,7 @@ public struct HorizontalValueSliderStyle<Track: View>: ValueSliderStyle {
}
)
} else {
self.track(configuration.value.wrappedValue)
self.track(configuration.value.wrappedValue).accentColor(.accentColor)
}

ZStack {
Expand Down

0 comments on commit 61a47ef

Please sign in to comment.