Drawing the blue "unread dot" on the iPhone Mail app - iphone

Does anyone have an example of how to draw the blue "unread dot" used in Apple's Mail App? This one in specific:
Drawing an ellipse is straight forward with Quartz2d, but the subtle use of shadows+gradients make this look really 3d.

I think the blue dot in mail is actually an image; I would imagine that blitting an image would be faster than drawing a gradient.

If you decide to go with a resource there is an app called UIKit-Artwork-Extractor that allows you to rip all the resources from all the IOS apps you have installed
https://github.com/0xced/UIKit-Artwork-Extractor

Related

Photoshop magic wand-like action in an iOS app

Is there a way to use a magic-wand tool (like in Photoshop) in Xcode for iPhone? What I want to do is to cut out the background of an image (a person standing in front of a white background) to make the background transparent.
Edit:
i think i was not specific enough, sorry. I would like the iPhone or iPad app to automatically remove the background of an image just taken with the camera. Thus, i can't use Photoshop for it and need a function or so to do this. I was thinking about a "flood fill" kind of solution similar to this:
http://www.codeproject.com/Articles/16405/Queue-Linear-Flood-Fill-A-Fast-Flood-Fill-Algorith
but was hoping that there is a more convenient solution especially for "cutting" out custom shaped areas of an image.
Thanks!
Floodfill assumes a uniform background color; on a real life photo, it won't ever be uniform. What you need is a Chromakey algorithm. See here:
Green screen / chroma key iOS

Dragging/Resizing a UIImage on the Device

I'd like to allow a user to add a shape (which would just be a UIImage) onto some sort of canvas, then move and resize it on the screen but I'm not sure how to go about this. Ideally I'd like the basics of a drawing app which can use images from a user's device. Each shape would have an associated position, size and z-index.
The only thing I'm unsure of is how I'd create a bounding box (the one with four blue dots to allow resizing/moving). I have experience with UIKit, and would prefer to keep the majority of the app in this for the time being, but I get the feeling this type of thing might be better suited to Cocos2D or a similar framework.
If anyone has any pointers/open source code I can dig through it would be hugely appreciated.
I think you should look into CALayer, or even CAShapeLayer. I'm just starting to play with them, but I'm pretty sure you can easily get the functionality you want with either. Draw the border in the layer's drawLayer:inContext:. Check out the Quartz2d Guide path drawing section for the functions you need.

iOS Trim Square Image to make rounded app like in app store

I'm grabbing app images from the iTunes affiliate program. Unfortunately Apple provides a square .jpg image which does not have the smooth rounded edges. How can I programmatically take the provided image and round the edges?
The only way I can think of how to do this is set the image as the background of a view, and then round the layer borders until it cuts off what I don't want to see. Is this a good approach?
I don't see any problem with that approach, I was going to suggest the same thing.

How to create a distorted screen

I want to show distorted image as error page for my application. If possible this can be a screenshot of home screen with some graphics distortion. Is this possible.
Thanks You.
As Daniel A. White's comment mentions, this probably will cause your application to be rejected from the App Store, but it can be accomplished in many ways. I think this technique would be acceptable if your own interface appeared broken, but not acceptable if you made any iOS supplied looks appear broken.
You could just use your favorite image editor (i.e. Photoshop) to distort a screen shot, and displayed it by putting it in a separate UIView. The image would be static. It couldn't react to the contents of your program's interface.
If your interface is drawn with OpenGL ES 2.0, you could draw your regular interface to a texture, then use that texture as input to another GLSL program that applied the distortion.

Replicating Mail Contact "Bubble" in iPhone SDK

When creating a new message using Mail on the iPhone, and after typing the contact, a blue "bubble" appears around the text. Is there some way I can replicate this behavior in my own application?
Thanks for any help!
The way I do this and probably the easiest way is with a custom UIView. You can draw inside a clipped rounded path with a blue gradient then draw the text on top of it.
You could also take a look at the Three20 project, which has a similar control. However, it's very complicated if you're just looking for that blue bubble.