AFPhotoEditorSession Class Reference
Inherits from | NSObject |
Declared in | AFPhotoEditorSession.h |
Overview
Photo Editor Sessions are obtained from instances of AFPhotoEditorController through the session
property. A session tracks and stores all user
actions taken in the AFPhotoEditorController it was obtained from.
Tasks
-
open
Specifies whether the session is still open.
property -
cancelled
Specifies if the session has been cancelled.
property -
modified
Specifies whether the session contains any actions.
property -
– createContextWithImage:
Generates a new AFPhotoEditorContext.
-
– createContextWithImage:maxSize:
Generates a new AFPhotoEditorContext with a maximum size.
-
– createContext
Deprecated.
-
– createContextWithSize:
Deprecated.
Properties
cancelled
Specifies if the session has been cancelled.
@property (nonatomic, assign, readonly, getter=isCancelled) BOOL cancelled
Discussion
Value will be TRUE if the user has invalided all actions by pressing “Cancel” in the generating AFPhotoEditorController.
Declared In
AFPhotoEditorSession.h
modified
Specifies whether the session contains any actions.
@property (nonatomic, assign, readonly, getter=isModified) BOOL modified
Discussion
Value will be TRUE if the user has modified the image in the generating AFPhotoEditorController.
Declared In
AFPhotoEditorSession.h
open
Specifies whether the session is still open.
@property (nonatomic, assign, readonly, getter=isOpen) BOOL open
Discussion
Value will be TRUE if the generating AFPhotoEditorController has not been dismissed.
Declared In
AFPhotoEditorSession.h
Instance Methods
createContext
Deprecated.
- (AFPhotoEditorContext *)createContext
Discussion
Please use `createContextWithImage: instead.
Declared In
AFPhotoEditorSession.h
createContextWithImage:
Generates a new AFPhotoEditorContext.
- (AFPhotoEditorContext *)createContextWithImage:(UIImage *)image
Parameters
- image
The image to generate the context with.
Return Value
A new photo editor context.
Discussion
Contexts may be used to replay the session’s actions on images. See AFPhotoEditorContext for more information.
Warning: Calling this method from any thread other in the main thread may result in undefined behavior.
Declared In
AFPhotoEditorSession.h
createContextWithImage:maxSize:
Generates a new AFPhotoEditorContext with a maximum size.
- (AFPhotoEditorContext *)createContextWithImage:(UIImage *)image maxSize:(CGSize)size
Parameters
- image
The image to generate the context with.
- size
The maximum size the context should render the image at.
Return Value
A new photo editor context that can be used to replay the session’s actions. See AFPhotoEditorContext.
Discussion
Warning: Calling this method from any thread other in the main thread may result in undefined behavior.
Declared In
AFPhotoEditorSession.h
createContextWithSize:
Deprecated.
- (AFPhotoEditorContext *)createContextWithSize:(CGSize)size
Parameters
- size
The size of the context.
Discussion
Please use createContextWithImage:maxSize:
instead.
Declared In
AFPhotoEditorSession.h