iZettle / Presentation

Presentation is an iOS Swift library for working with UI presentations in a more structured way
MIT License
73 stars 11 forks source link

Split VC isCollapsed fix (issue 54) #56

Closed nataliq closed 4 years ago

nataliq commented 5 years ago

1.9.0

- [Addition] Add a new `isCollapsedState` signal to DualNavigationControllersSplitDelegate that has a `nil` value until the collapsed state is known. Old `isCollapsedSignal` is deprecated.
- [Addition] Add a new `init(collapsedState:)` method to DualNavigationControllersSplitDelegate that takes a future to get notified of a known collapsed state. The `init` without parameters is deprecated.
- [Change] Deprecate MasterDetailSelection's init with `isCollapsed` signal in favour of init that can handle a `nil` collapsed state
- [Bug fix] DualNavigationControllersSplitDelegate's `isCollapsedSignal` didn't signal `false` when moving from collapsed state to not collapsed (multitasking/rotation)
- [Bug fix] DualNavigationControllersSplitDelegate's `isCollapsedSignal` didn't signal anything on iOS 13 ([issue #54](https://github.com/iZettle/Presentation/issues/54))

Tested with the Messages app on iOS 11 and 13. Tested in the main iZettle project too.

nataliq commented 4 years ago

@enhorn can you take a look again? I'm very happy to not use the new name collapsedState if you have ideas how to maintain the previous API so that this is not a breaking change. Or maybe introduce an enum that has unknown/collapsed/expanded states.

nataliq commented 4 years ago

@mansbernhardt thought you might have some input on this PR?

enhorn commented 4 years ago

I like the idea of the enum instead of an optional boolean. Opens for clearer documentation as well.

nataliq commented 4 years ago

@niil-ohlin I'm getting some strange swiftlint failure on the CI for unused self now that I'm using .with(weak: self). When I run swiftlint --strict locally I get no warnings. Where can I see what version of SwiftLint we use?

nataliq commented 4 years ago

I think Swiftlint should be happy now. Can you re-review?

nataliq commented 4 years ago

Pressed merge instead of squash.. oh well 😔