ContextMenu icon indicating copy to clipboard operation
ContextMenu copied to clipboard

Use UIView.TintAdjustmentMode

Open ivan-magda opened this issue 5 years ago • 6 comments

Hey, @rnystrom

I think it would be nice to update tintAdjustmentMode like Apple UI controls do. If you wish I can create a PR, just two lines of code:

  • on appear
UIApplication.shared.keyWindow?.tintAdjustmentMode = .dimmed
  • on disappear
UIApplication.shared.keyWindow?.tintAdjustmentMode = .normal

ezgif com-resize

ivan-magda avatar Aug 23 '18 20:08 ivan-magda

Scratching my head, what’s he difference? What value does this add? I’m not familiar with the API.

Sent with GitHawk

rnystrom avatar Sep 13 '18 16:09 rnystrom

@rnystrom seems like you didn't note how the color of UIBarButtonItems have changed? .dimmed tint mode makes them black & white, this API is used in UIAlertController.

av0c0der avatar Jan 05 '19 08:01 av0c0der

@Jauzee what do you mean about the color change?

rnystrom avatar Jan 05 '19 15:01 rnystrom

@rnystrom I meant tint color of the buttons on the gif.

av0c0der avatar Jan 05 '19 16:01 av0c0der

Oh now I see it! TIL that’s a thing. I’m down with offering this as an optional config.

Sent with GitHawk

rnystrom avatar Jan 05 '19 16:01 rnystrom

@rnystrom one thing to note here — if we apply tintAdjustmentMode on the key window it will apply it on the presented view controller's subviews too.

I've also read about this API just a few weeks ago. :)

av0c0der avatar Jan 05 '19 16:01 av0c0der