m1entus / MZFormSheetPresentationController

MZFormSheetPresentationController provides an alternative to the native iOS UIModalPresentationFormSheet, adding support for iPhone and additional opportunities to setup UIPresentationController size and feel form sheet.
MIT License
973 stars 146 forks source link

Is it possible to prevent fading of the modal view? #19

Closed egeriis closed 9 years ago

egeriis commented 9 years ago

I want to retain fading the background, but turn off fading of the modal view, since I've made a custom transition. Is that possible somehow?

m1entus commented 9 years ago

You can set background to clear color

ay8s commented 9 years ago

Also hoping to achieve this effect using MZFormSheetPresentationController.

Setting the formControllers background to clear didn't seem to have the desired effect. It looks like MZFormSheetPresentationControllerAnimator fades in/out the view when presenting/dismissing.

It's likely we'd need a dimmingView added to MZFormSheetPresentationControllerAnimator to allow for adjusting the background independently so the background can fade in but the modal comes straight in without a fade.

egeriis commented 9 years ago

@ay8s That was exactly what I was looking for. Would that be a possible addition @m1entus?

m1entus commented 9 years ago

I am little bit busy and don't have motivation to add it after working hours. Feel free to make this feature, i will review pull request and we could add it,

m1entus commented 9 years ago

I made a new property which you can use to set custom presentation animator:

@property (nonatomic, strong, null_resettable) id <MZFormSheetPresentationControllerAnimatorProtocol> animatorForPresentationController;

In Objective-C example i made a effect which you would like to have.