Alert (type actionSheet) message font, colour is not getting set by setting the attributedMessage.
actionSheet seperator lines are not visible
size of the actionSheet is increased, causing the popover size also to increase
func processActionSheet(message: String, actions: [UIAlertAction]) {
let alertController = UIAlertController(title: "", message: message, preferredStyle: .actionSheet)
alertController.modalPresentationCapturesStatusBarAppearance = true
alertController.view.tintColor = UIColor.whiteColor
alertController.setValue(NSAttributedString(string: message, attributes: [NSAttributedString.Key.foregroundColor: UIColor.white.colorWithAlpha(0.6), NSAttributedString.Key.font: UIFont.preferredFont(forTextStyle: .callout)]), forKey: "attributedMessage")
alertController.view.layer.borderWidth = 1
alertController.view.layer.borderColor = UIColor.popoverDefaultBackgroundColor.cgColor
alertController.view.layer.cornerRadius = 12
if let subview = alertController.view.subviews.first, let alertContentView = subview.subviews.first {
for innerView in alertContentView.subviews {
innerView.backgroundColor = UIColor.popoverDefaultBackgroundColor
}
}
for action in actions {
alertController.addAction(action)
}
shouldDismissPopover = false
self.present(alertController, animated: true)
}