uialertviewcontroller

Change UIAlertController's title fontsize

試著忘記壹切 提交于 2020-01-04 15:14:39
问题 I'm trying to change the title fontSize in an UIAlertController , but I can't manage how to set my NSMutableAttributedString to the title -property. So for I've been creating the NSMutableAttributedString with the following code: let title = NSMutableAttributedString(string: user.fullName) let range = NSRange(location: 0, length: title.length) title.addAttribute(NSAttributedStringKey.font, value: UIFont.TextStyle.largeTitle, range: range) Now the tricky part for me is how to figure out how to

All the alert dialog message and textField have been changed to single line. Please checkout the image

邮差的信 提交于 2019-12-04 01:07:26
问题 Previously all the dialog and textField are working well. But not I do not know how these TextFields are suddenly changed to single line with triple. (Like some Message here...) let alert = UIAlertController(title: "Cancel Booking !!", message: "Are you sure you want to cancel your booking?", preferredStyle: .alert) alert.addAction(UIAlertAction(title: "No", style: .default, handler: nil)) alert.addAction(UIAlertAction(title: "Yes", style: .default, handler: self.cancelMessageDialog)) self

All the alert dialog message and textField have been changed to single line. Please checkout the image

对着背影说爱祢 提交于 2019-12-01 03:59:44
Previously all the dialog and textField are working well. But not I do not know how these TextFields are suddenly changed to single line with triple. (Like some Message here...) let alert = UIAlertController(title: "Cancel Booking !!", message: "Are you sure you want to cancel your booking?", preferredStyle: .alert) alert.addAction(UIAlertAction(title: "No", style: .default, handler: nil)) alert.addAction(UIAlertAction(title: "Yes", style: .default, handler: self.cancelMessageDialog)) self.present(alert, animated: true, completion: nil) I had the same problem and solved it after 3 days and