简体   繁体   中英

When presenting a custom modal view, how do I “fade out” the colors of the controls in the background?

This seems like a really simple question, butI cannot find the answer to it.

In iOS 7, when presenting a modal view controller that doesn't take up all of the screen, such as a UIAlertController , it fades out the colors in the background from, say, blue, to grey to indicate they can't be interacted with.

How do I do this?

Set the tintAdjustmentMode of some view high up in the hierarchy. The dimming will propagate down.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM