Closed palmin closed 6 years ago
This was the easiest way for me to ask this question and it is not a issue with ContextMenu as such. Feel free to close the issue without a second thought.
I found a solution that seems to work.
Setting window.tintAdjustmentMode = UIViewTintAdjustmentModeDimmed
when presenting ContextMenu and resetting to window.tintAdjustmentMode = UIViewTintAdjustmentModeNormal
when dismissing dims tint colors behind ContextMenu while shown but leaves the one inside ContextMenu normal.
I presume UIKit adjusts tintAdjustmentMode
on presented view controllers.
This is a very nice implementation and I plan to use it in Working Copy for switching between branches and file modes.
Everything behind ContextMenu is dimmed slightly with the overlay, but I'm trying to also dim the tint using the
UIViewTintAdjustmentModeDimmed
mechanism. This makes it much clearer that the ContextMenu has focus.Do you know of some way to inform UIKit that this should happen?
A regular
modalPresentationStyle = .popover
gives this effect, but I cannot figure out how to achieve this withmodalPresentationStyle = .custom
.Being really picky about my development tools I'm still waiting for Swift tooling to mature and ported most of ContextMenu to objective-c. Is this something you would like to get back into the project or would you rather not?