iOS 5 black transparent UIAlertView - iphone

I'm aware that this question has been asked before for earlier versions of iOS, however, as far as I remember, people at the WWDC this year emphasised that we can finally customise everything very easily, e.g. the tint colours of switches (UISwitch onTintColor etc.).
I had a look at the AlertView but the only options are password input / text input. Perhaps I'm missing something obvious here, but is it still not possible to change the background tint colour of an UIAlertView in iOS 5 easily? All the other UIAlertViews in iOS are blackish/transparent, so there should be an easy way or not?
I checked the docs but couldn't find anything specific for iOS 5.

I have no idea if the background color can be changed that easily in iOS5 but traditionally speaking changing UIAlertView background is to do with setting a new image. The link you provided & this link provide help.

Related

How to replace the default font for the whole OS

Is there a way to make my app override the current font of the currently foreground application?
What I have in mind is no matter which app is on foreground my app to be able to attach a button to the keyboard which will switch the font to a custom one thus overriding the current font for all ui elements(labels, buttons, text fields etc.).
What you're looking for is not allowed by Apple.
It seems it can be done for jailbroken devices though. It's difficult to tell how exactly they're doing it but I guess they meddled around with the images/colors provided by Apple for the keyboard and replaced them with their custom ones leaving the default un-recoverable.
Here's a blog about it too.
You can create a category on UIFont and replace systemFontWithName:size: and boldSystemFontWithName:size: with your own font. But this may have some weird side effects, as even alertViews and actionSheets are customized with that method..
edit: of course this works only in your own app.. you cannot change anything outside of your app.

How to make the UIKeyboard black?

I've seen this SO question here: Can I tint (black) a UIKeyboard? If so, how?, where the top answer suggests that you can hack around but doing so may get your app rejected by Apple. This must not be true, as I've seen other iPhone applications (a major one being Clear) that have a black UIKeyboard. How is it done?
Here's a screenshot of Clear for reference:
Try this out
[(UITextField *)mySubView setKeyboardAppearance:UIKeyboardAppearanceAlert];
or just adding setKeyboardAppearance:UIKeyboardAppearanceAlert appropriately depending on how you have this set up!
Isnt this the [textView setKeyboardAppearance:UIKeyboardAppearanceAlert]; style?
Otherwise, as stated. It's not possible without hacking the subviews. Of course you can still setup your own complete inputView.
Starting in iOS 7, you can use UIKeyboardAppearanceDark
So, for example:
self.textField.keyboardAppearance = UIKeyboardAppearanceDark

How do I change the tint color (background) of a UIActionSheet in iOS5?

I would like to change the tint color of my UIActionSheet for my iOS apps. Is there an easy answer or custom class which I can use to achieve this?
I have found help on changing the colors of the Action Sheet buttons which is helpful, but I haven't found anything about changing the background color.
There is no API, but you could subclass UIActionSheet and play around with its subviews array till you find the one that draws the background and either edit it directly, or add a subview to cover it up.
While this isn't the greatest approach, it isn't using any hidden APIs to it won't get rejected from the iTunes store. Before iOS 5, this is how most customization was done.
Here is a great example of doing it with Navbars.
I am not able to respond to the above comments. However the link provided by #Luke is broken, but I have found it to be active here: https://github.com/gpambrozio/BlockAlertsAnd-ActionSheets
There is no legal API for this, and if you use illegal API your app will be rejected from the app store. The simplest solution is to roll your own interface and not use UIActionSheet.

Question about UIWindow backgrounds

I have written a powerful trig calculator, but I want to use the "linen" background. I have been able to implement this in interface builder, but I get a 'yellow triangle' warning in Xcode that says it is not compatible with something like iOS 3.2 and earlier. And I'm afraid Apple will reject it if says that. I want to know the code that I can use to change both the text color (from black to white) and the background texture (from blue and white vertical stripes to the darker linen). I already know a few ways to test and apply info about the users current firmware version, but I'm always open to suggestions. Any help will be GREATLY APPRECIATED!!! I have just read the first 3 answers and duh I feel kinda stupid, that makes sense. But I would also like to know how to do this and make it like a user configurable "setting" just to make it feel nicer :-) thanks
The linen background is a tiling UIColor. You can create a tile color programmatically and apply this tiled background anywhere you would set a backgroundColor. Even on UIWindow.
If you want to maintain compatibility to old iOS versions, replace the built in background "color" (such as linen) with an UIImageView showing an image of it.
Write a simple app, filling the entire screen with the background, make a screenshot, then place it behind all other UI elements.

How can I use images provided by the iPhone OS?

First, let me state what brought this question about: I saw the green checkmark icon in this post and I would like to use it in my own application. However, since it looks so much like the UITableViewCellAccessoryDetailDisclosureButton my assumption is that this green checkmark icon is provided by the iPhone OS in some form or fashion.
So, my question is: how can I use the green checkmark icon and/or other OS-provided images in my own applications?
As a side question: where can I find a list of the OS-provided images (if they even exist)?
Thanks very much for any input :-)
This is not one of the standard images.
To see what you have available, you can add a UIBarButton in interface builder and try different system icons.