Articles Tagged 'UIImage'

Very short snippet: the UIView to display an image

Working with Interface Builder can be spontaneously use an object UIImageView to set the background of our view controller. Alternatively you can delete this object, thus saving a little 'memory, and exploit the view associated with the view controller. Just plug in our view controller:

More ...

CaptureView: capture a UIView

o UIImageView ) in modo rapido. CaptureView allows to clone, in the form of image, any view ( UIView or UIImageView ) quickly. (quindi visualizzato). What is obtained is an object CaptureView that can be used as a normal UIView (then displayed). Capturing the "screen", or a portion thereof, may be useful in many cases. Once the new "image", it can be manipulated without preoccparsi of its content.
Often you have multiple nested view and THET effects or transformations on the view that the parent contains all is not always an optimal solution.

More ...

Very short snippet: storing a series of images in NSUserDefaults

ai dati dell'immagine. To store an image in NSUserDefaults is sufficient to be able to obtain a pointer NSData image data. In this way we could rebuild our image at any time thereafter.

In the example shown below is used an array that contains a maximum of 4 images. Each new image is put on the head and the excess removed.

More ...

UIImage: useful snippets

, sono molto utilizzati nello sviluppo di applicazioni per Apple iPhone. The object UIImage , along with UIImageView , are widely used in developing applications for Apple iPhone. Here is some useful code-snippets to make a series of processing common:

Combine two (or more) images

1
2
3
4
5
6
7
8
9
10
11
12
UIImage * ) combineImage : ( UIImage * ) imageA imageB : ( UIImage * ) imageB { - (UIImage *) combineImage: (UIImage *) imageA imageB: (UIImage *) {imageB
; UIGraphicsBeginImageContext (imageA.size);

CGRectMake ( 0 , 0 , imageA.size.width, imageA.size.height ) ] ; [ImageA drawInRect: CGRectMake (0, 0, imageA.size.width, imageA.size.height)];
CGRectMake ( 0 , 0 , imageB.size.width, imageB.size.height ) ] ; [ImageB drawInRect: CGRectMake (0, 0, imageB.size.width, imageB.size.height)];

UIGraphicsGetImageFromCurrentImageContext ( ) ; UIImage * combinatedImage UIGraphicsGetImageFromCurrentImageContext = ();

UIGraphicsEndImageContext ();

combinatedImage return;
}

More ...

Very short snippet: recording an image in the Photo Album

Easy way to save an image in the photo of the device inside of our application (or loaded remotely):

More ...


Stop SOPA