Adding Images to UIActionSheet buttons as in UIDocumentInteractionController

There is a possibility to add images (to be exact: icons or symbols) to the buttons of a UIActionSheet (or a UIAlertView) without loading image files or fiddling around with (sub)views. In these classes buttons are specified by their titles, which are strings. So it is obvious to use symbols, which one can specify also … Read more

How to change the background color of the UIAlertController?

You have to step some views deeper: let subview = actionController.view.subviews.first! as UIView let alertContentView = subview.subviews.first! as UIView alertContentView.backgroundColor = UIColor.blackColor() And maybe you want to keep original corner radius: alertContentView.layer.cornerRadius = 5; Sorry for the “Swifting” but i’m not familiar with Objective-C. I hope that’s similar. Of course it’s also important to change … Read more

Showing a UIPickerView with UIActionSheet in iOS8 not working

From the reference for UIActionSheet: UIActionSheet is not designed to be subclassed, nor should you add views to its hierarchy. If you need to present a sheet with more customization than provided by the UIActionSheet API, you can create your own and present it modally with presentViewController:animated:completion:. My guess is your seeing exactly why. The … Read more

Change text color in UIActionSheet buttons

iOS 8: UIActionSheet is deprecated. UIAlertController respects -[UIView tintColor], so this works: alertController.view.tintColor = [UIColor redColor]; Better yet, set the whole window’s tint color in your application delegate: self.window.tintColor = [UIColor redColor]; iOS 7: In your action sheet delegate, implement -willPresentActionSheet: as follows: – (void)willPresentActionSheet:(UIActionSheet *)actionSheet { for (UIView *subview in actionSheet.subviews) { if ([subview … Read more