
I want to achieve a selected state with an effect similar to what the built-in widgets have, where the colors behind the notification show through. How can I do this?

I want to achieve a selected state with an effect similar to what the built-in widgets have, where the colors behind the notification show through. How can I do this?
Simply add a
UIButtonto the contentView of aUIVisualEffectsViewusing[UIVibrancyEffect notificationCenterVibrancyEffect]:By default, your button's backgroundColor should be [UIColor clearColor]. Then, when it's tapped, just set its background color to
[[UIColor lightGrayColor] colorWithAlphaComponent:0.5]. (The alpha value helps when content behind the notification center is almost all white).