Gradient on UIToolbar contained in UIPopoverController - iphone

When a UIToolbar is placed inside of a UIPopover, there is a gloss layer that is always drawn on top of it. This gloss layer is drawn regardless of whether or not there is a custom image supplied for the UIToolbar. I have also tried getting rid of this by setting a different shadowImage, but the shadow image was never displayed.
Here is an example. The UIPopover here has a custom background view that is drawn a straight black to show the problem.
Does anyone know how to either disable this gloss or (better yet) replace it with a gloss image of my own?

Related

Fill iPhone Screen With Translucent Mask EXCEPT For One Area

I already have a view box showing the user where to center the text they would like to analyze, but I would like to fill the rest of the screen with a translucent gray mask. Unfortunately I can't simply pre-render what I want (as shown in the image) in Photoshop and just add it to the project because I need the view box to remain programmatically added separately. Is there a way to add color to a view in all areas except a designated area?
Why not just add 4 translucent views (fill them with black and set their alpha property to 0.5 for example) on top of the view? One on top, bottom, left and right of the area you want translucent?
That shouldn't be too hard to do, you can just modify the size of the views based on where you want the box to be.

What's this UI element?

What's the UI element that is top of that number buttons to display number ? (which is in light blue color)
It looks like a UINavigationBar with a prompt. However, the location of the gloss (which differs from your typical UINavigationBar) and the centering of the numbers (not shown) makes me think it is a custom view.
If you're trying to replicate it, I'd suggest starting with a UIView. Add a UIImageView with appropriate image for the the blue background and a UILabel for the text. Or, instead of the UIImageView, you could draw the background in the UIView's drawRect: method.

How to build knob like spinner in iOS sdk?

I want to build a spinner for menu selection like the one in where to? IPhone app as shown in image below. Any hints?
Doesn't need to be very hard. The easiest is probably a UIImageView with the image of the actual spinner, and another UIImageView with the yellow selection highlight (a transparent PNG) overlaying. The rotation can then be controlled with the transform property of the first UIImageView.
This should of course be nicely encapsulated in a custom UIView subclass.

Iphone Custom Scrollview indicator

I am currently working on an application for a client, and they have made an odd request. The request involves putting a custom image as the indicator for the scrollview. I am not even sure if this is possible but if it is can you please let me know how one would go about doing that.
Thanks
UIScrollView streches a small, semi-transparent circle image to generate its scrollbars. You can find this image as the first subview of a UIScrollView:
UIImageView *circle = [scrollView.subviews objectAtIndex:0];
However, as I said this image is stretched, and as far as I can tell, only the alpha values are considered when drawing the scroll bars.
So for example if you're only interested in changing the top/bottom ends of the scroll bar, you can try to change this image. However, I doubt you'll be able to do anything interesting.
A possible solution that comes to mind, and this is only a theory, is to add a custom, transparent UIView on top of a UIScrollView. Then you can hide the default scroll bar (by using showsHorizontalScrollIndicator and showsVerticalScrollIndicator), pass the necessary touch events to the UIScrollView to scroll the content, and draw the scrollbars in your custom view.

Why does UIImageView appear to be partially transparent

I have a simple app that just displays a UIImageView. For some reason the image appears that it is partially transparent as it is much lighter than if I view the same image in photoshop. Any suggestions...I though by default a UIView is opaque.
You have probably changed the alpha of your imageView or the view itself. check for the the transparency of your imageview also. Because the default alpha of the imageview is 1 and opacity is also set to 100%. You might have chane one of these otherwise this is the problem of your image only
I don't believe that UIImageView is by default partially transparent? Try changing the background colour of the application and see if that affects the outcome of your image, if it is transparent it should be darker with a black background rather than white.