ekazaev / route-composer

Protocol oriented, Cocoa UI abstractions based library that helps to handle view controllers composition, navigation and deep linking tasks in the iOS application. Can be used as the universal replacement for the Coordinator pattern.
MIT License
896 stars 63 forks source link

Add presentationConfig block to PresentModallyAction #97

Closed vykut closed 1 year ago

vykut commented 1 year ago

Hi,

Currently ViewControllerActions.PresentModallyAction allows only for configuring the UIPopoverPresentationController instance. In our usecase, we need to configure the UISheetPresentationController which is only available in iOS 15 or later. I have modified the existing ViewControllerActions.PresentModallyAction to allow for such configuration, by providing the generic UIPresentationController in a config block, which can then be casted to either UISheetPresentationController, or UIPopoverController.

Therefore, I generalized the API a bit, but have kept the existing functionality of configuring only the UIPopoverPresentationController so this change is not a breaking one for existing consumers.

ekazaev commented 1 year ago

Ho @vykut. Thank you very mich. yes sorry. I haven't recently updated the route-composer as my current app still supports ios 14 😂. Nice job.

vykut commented 1 year ago

@ekazaev are you going to tag a new release or should we point to the master branch?

ekazaev commented 1 year ago

@vykut of course. Just I am not by the laptop atm.

ekazaev commented 1 year ago

@vykut New version was released