Inherits from NSObject
Declared in PSImage.h

Overview

This class represents an Image

Tasks

Creating an Image

Access and modify image

Class Methods

imageNamed:ofType:

Creates and returns an image containing image data

+ (PSImage *)imageNamed:(NSString *)name ofType:(PSImageType)type

Parameters

name

The name of the file. The methods looks for name.png and name@2x.png in the application’s main bundle.

type

Type of the image

Return Value

A PSImage with contents of name.png and name@2x.png if available

Discussion

Creates and returns an image containing image data

Declared In

PSImage.h

imageOfType:

Creates and returns an empty image

+ (PSImage *)imageOfType:(PSImageType)type

Parameters

type

Type of the image

Return Value

A PSImage

Discussion

Creates and returns an empty image

Declared In

PSImage.h

Instance Methods

image:

Get image data of the image

- (UIImage *)image:(PSImageResolution)resolution

Parameters

resolution

Image resolution

Return Value

UIImage if image data for resolution is available, nil otherwise

Discussion

Get image data of the image

Declared In

PSImage.h

setImage:forResolution:

Sets image data for the image

- (void)setImage:(UIImage *)image forResolution:(PSImageResolution)resolution

Parameters

image

Image data

resolution

Image resolution

Discussion

Sets image data for the image

Declared In

PSImage.h

type

Returns the image type

- (PSImageType)type

Return Value

The image type

Discussion

Returns the image type

Declared In

PSImage.h