Text Engraving effect in UILabel - iphone

How can we bring the Engraved effect of a UILabel's Text?
I wanted the effect as provided in the snapshot I have provided.
I could not add the image, so I have added the Link where I have hosted it.
Image

If you're using a light text color, set the shadow to a color darker than your text and move the shadow up 1 pixel.
If you're using a dark text color, set the shadow to a color lighter than your text and move the shadow down 1 pixel.

Related

Set alpha on one color in UIImage

I have this PNG image: (the area in the grey borders is transparent)
I would like only the grey corners to have alpha of 0.5
If I set
[imgView setAlpha:0.5f];
Also the transparent area in the middle retrieves a semi-white color.
How can I do it?
Any reason why you don't just change the original image file? If that's not possible, you could put a white (black?) rectangle with 50% opacity below the image.
Of course there are many ways to do this but you would need to tell us more about your use case.
You should add one imageview below your desired image. and adjust alpha of that image.

What is background color of uipicker control?

I am using a uipicker as an input view for a text control. I also have a toolbar set up as an accessory input view. I would like the toolbar tint to match the picker. I have tried using the magnifier tool on the color chooser to get the RGB for the picker, but when I use these RGB values to set the tint on the toolbar I get get a close, but not exact match.
Is there anyway to figure out exactly the background color of the picker? None of the palettes in the color chooser seem to have this particular shade of gray with a slight hint of blue.
Thanks,
Jenny
The border consists of a gradient for the top half and a solid color for the bottom half:
As for the 'white' background, the brightest part is a #fafafa to #5f627c gradient.

How to set the shadow color for Image?

Hai, I am doing one application, in that i want to provide the shadow color for image after setting the border color. But border color and shadow color both are different. So please tell me any more suggestions.
Have you looked at CALayer? It has a property called shadowColor. This works you are referring to an UIImageView object. If you're referring to the image, you can look at CGContextSetShadowWithColor to add an image using Quartz.

Core graphics color blending

I have a line of text which I want to display behind a CALayer, and when behind, then the text color should appear in a different color in the overlapping area.
The color of the text is black, and the text color should appear as white on the red layer when they overlap (they may both move around, so this needs to be continuously updated).
How may this be accomplished?
This can’t be done with any blend mode. You’ll need to render the text into the foreground layer in white by hand.
One trick you could try is to keep the white text always visible, but clipped by the layer that moves around using a second layer that also moves, set as the text’s mask.

Watermark on a UIImage with auto contrast?

I want to put a watermark on a UIImageView. I have two watermark images, a black one and a white one. I want to put the black one on the UIImageView when the area of the watermark is bright, and the white one on the UIImageView when the area of the watermark is dark. How to do that?
Any help would be appreciated.
Perhaps you should consider having a single watermark that looks ok on all backgrounds, like a transparent white with opacity or grey color with a drop shadow. This seems like less hassle than trying to programmatically determine relative brightness on an image.