TVIScreenCapturer Class Reference
Inherits from | NSObject |
---|---|
Conforms to | TVIVideoCapturer |
Declared in | TVIScreenCapturer.h |
Overview
TVIScreenCapturer
captures from a UIView
by using UIGraphics to draw its contents to an offscreen buffer.
In iOS 12.0, Apple introduced the new A8 backing store and improved color management. However, at the same time,
drawing the contents of a UIView
became prohibitively expensive with some UIView and device combinations.
For this reason we are deprecating this class on iOS 12.0 and above. If you wish to capture the entire screen (or a
portion of it) then we recommend that you use ReplayKit with a custom TVIVideoSource
instead.
capturing
Indicates that screen capture is active.
@property (atomic, assign, readonly, getter=isCapturing) BOOL capturing
Declared In
TVIScreenCapturer.h
– initWithView:
Constructs a TVIScreenCapturer
with a UIView
.
- (null_unspecified instancetype)initWithView:(nonnull UIView *)view
Parameters
view |
The |
---|
Return Value
An instance of TVIScreenCapturer
if creation was successful, and nil
otherwise.
Discussion
TVIScreenCapturer
captures the contents of a single view at 1x scale.
Because this class depends on UIKit and CoreGraphics to snapshot content it does not function
if the application is backgrounded. This class will not respond to TVIVideoConstraints
.
Instead, it will use the dimensions of the view to determine its capture size.
Declared In
TVIScreenCapturer.h
– init
Developers shouldn’t initialize this class using init
.
- (null_unspecified instancetype)init
Discussion
Initialize TVIScreenCapturer with a UIView.
Declared In
TVIScreenCapturer.h