ContextAcceptingView
@available(iOS 13.0, macOS 10.15, tvOS 13.0, watchOS 6.0, *)
public protocol ContextAcceptingView
The protocol for a View
to make it compatible with ContextSettingTask
.
Due to some current swift
limitations protocol ContextAccepting
can not be used directly.
-
Type of
Context
object thatView
can be acceptDeclaration
Swift
associatedtype Context
-
checkCompatibility(with:
Default implementation) -
ContextSettingTask
will call this method to provide theContext
instance to theView
that has just been build or found.Declaration
Swift
mutating func setup(with context: Context) throws
Parameters
context
Context
instance.