Closed jonasman closed 11 years ago
Why not!
In order to avoid several additional parameters in the API for each new option, a good idea would be to use a single options parameter like the one in [UIView animateWithDuration:options] which bears several different kind of values. Then we could move the blur and style into this parameter. The API would become
[ASDepthModalViewController presentView:withBackgroundColor:options:].
And options would be something like
typedef NS_OPTIONS(NSUInteger, ASDepthModalOptions) {
ASDepthModalOptionAnimationGrow
ASDepthModalOptionAnimationShrink,
ASDepthModalOptionAnimationNone,
ASDepthModalOptionBlur,
ASDepthModalOptionBlurNone,
ASDepthModalOptionTapOutsideToClose,
ASDepthModalOptionTapOutsideInactive
}
Would it be easier for you like that? What's your opinion?
It is a good option the options, in case the options are nil it would use the default ones.
So, I'll try to change the API as soon as I have time. Or maybe you want to contribute on this?
I never did any contrib in github, I will try if i have some time :)
This feature Tap outside to close could be optional via use of a property.
What do you think?