RendererViewContext
public class RendererViewContext
Describes the context for the RendererView
. A context is used to execute the commands using RendererCommandExecutor
. In a typical scenario, where there are
multiple levels of RendererView
s that are contained in another RendererView
by virtue of being in Attachment
s, all the RendererView
s sharing the same
context automatically share the RendererCommandExecutor
. i.e. the RendererCommandExecutor
operates on only those RendererView
s which have the same
context as provided to the RendererCommandExecutor
.
-
Identifies the
RendererViewContext
uniquely.Declaration
Swift
public let id: String
-
Friendly name for the context. It is possible to create multiple
RendererViewContext
using the same name. A context is uniquely identified byid
and not the name.Declaration
Swift
public let name: String
-
Default shared context. Use this in case there is only a single
RendererView
on the screen at the root level.Declaration
Swift
public static let shared: RendererViewContext
-
Initializes a new context
Declaration
Swift
public convenience init(name: String)
Parameters
name
Friendly name for the context.