Take separatorColor as part of the `SplitScreenContainerScreen` model
MODIFY
.gitignore
.gitignore
@@ -55,3 +55,6 @@ SampleApp.xcworkspace
# Special Mkdocs files
docs/kotlin/api/
docs/swift/api/
+
+# ios-snapshot-test-case Failure Diffs
+FailureDiffs/

MODIFY
WorkflowSplitScreenContainer.podspec
WorkflowSplitScreenContainer.podspec
@@ -30,7 +30,12 @@ Pod::Spec.new do |s|
test_spec.dependency 'iOSSnapshotTestCase'
- test_spec.scheme = { environment_variables: { 'FB_REFERENCE_IMAGE_DIR' => '$PODS_TARGET_SRCROOT/swift/WorkflowSplitScreenContainer/SnapshotTests/ReferenceImages' } }
+ test_spec.scheme = {
+ environment_variables: {
+ 'FB_REFERENCE_IMAGE_DIR' => '$PODS_TARGET_SRCROOT/swift/WorkflowSplitScreenContainer/SnapshotTests/ReferenceImages',
+ 'IMAGE_DIFF_DIR' => '$PODS_TARGET_SRCROOT/swift/WorkflowSplitScreenContainer/SnapshotTests/FailureDiffs'
+ }
+ }
end
end

MODIFY
swift/WorkflowSplitScreenContainer/Sources/SplitScreenContainerScreen.swift
swift/WorkflowSplitScreenContainer/Sources/SplitScreenContainerScreen.swift
@@ -28,14 +28,19 @@ public struct SplitScreenContainerScreen: Screen {
/// The ratio of `leftScreen`'s width relative to that of `rightScreen`. Defaults to `.third`.
public var ratio: Ratio
+ /// The color of the `separatorView` displayed between `leftScreen`'s and `rightScreen`'s views.
+ public var separatorColor: UIColor
+
public init<LeftScreenType: Screen, RightScreenType: Screen>(
leftScreen: LeftScreenType,
rightScreen: RightScreenType,
- ratio: Ratio = .third
+ ratio: Ratio = .third,
+ separatorColor: UIColor = .black
) {
self.leftScreen = AnyScreen(leftScreen)
self.rightScreen = AnyScreen(rightScreen)
self.ratio = ratio
+ self.separatorColor = separatorColor
}
}

MODIFY
swift/WorkflowSplitScreenContainer/Sources/SplitScreenContainerViewController.swift
swift/WorkflowSplitScreenContainer/Sources/SplitScreenContainerViewController.swift
@@ -41,7 +41,7 @@ final class SplitScreenContainerViewController: ScreenViewController<SplitScreen
self.separatorView = UIView()
self.separatorView.translatesAutoresizingMaskIntoConstraints = false
- self.separatorView.backgroundColor = .black
+ self.separatorView.backgroundColor = screen.separatorColor
self.rightContainerView = UIView()
self.rightContainerView.translatesAutoresizingMaskIntoConstraints = false
@@ -66,6 +66,8 @@ final class SplitScreenContainerViewController: ScreenViewController<SplitScreen
return viewController
}
+ self.separatorView.backgroundColor = screen.separatorColor
+
if let leftContentViewController = leftContentViewController {
if leftContentViewController.screenType == type(of: screen.leftScreen) {
leftContentViewController.update(screen: screen.leftScreen)

Take separatorColor as part of the `SplitScreenContainerScreen` model