UIAlertController-MZStyle
UIAlertController-MZStyle copied to clipboard
Title and message not visible on iOS 10
As per iOS 10b2, the title and message is not visible when using this. Perhaps they rearranged the view hierarchy (again...)?
I have investigated this and yes, they have rearranged the view hierarchy, even they are using UIStackView for actions. Looking for a solution as I also need to support iOS 10.
Is there any ways to set the message colour, when I use the dark mode, the message is also the black colour on ios 9, and it's able to change the button colours but no ways to set the message colour ? and also try every style all the message color is black in alter view.
my codes: [UIAlertController mz_applyCustomStyleForAlertControllerClass:[UIAlertController class]]; MZAlertControllerStyle *defaultStyle = [UIAlertController mz_sharedStyle]; defaultStyle.blurEffectStyle = UIBlurEffectStyleDark; defaultStyle.backgroundColor = RF_WHITE_COLOR; defaultStyle.defaultButtonColor = RF_WHITE_COLOR; defaultStyle.destructiveButtonColor = RF_WHITE_COLOR;
I forked this and added some code to account for iOS10. I also added in properties for Title and Message color. https://github.com/vinced45/UIAlertController-MZStyle . I'll test it some more and then do a pull request.
@vinced45 Thanks for the update. In action sheet mode I can't seem to change the cancel button's appearance. Can you confirm that?
@mickeyl ,I also find this problem,can you have some way to solve it,thank you!
@quzhengping After struggling for quite a while with it, I finally gave up with the idea of tweaking the built-in alerts to my liking. It will always be potentially unstable. I'm now using https://github.com/Friend-LGA/LGAlertView with an own wrapper API on top. This solves all my customization issues.
@mickeyl Thank you.LGAlertView solves my issues!