Page Menu
Home
Musing Studio
Search
Configure Global Search
Log In
Files
F14174868
EnvironmentValues+Extensions.swift
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
539 B
Subscribers
None
EnvironmentValues+Extensions.swift
View Options
// Credit:
// https://github.com/sindresorhus/Blear/blob/9ce7cd6ad8d6a88f8d0be12b1ef9152baeeacf96/Blear/Utilities.swift#L1052-L1064
import
SwiftUI
extension
EnvironmentValues
{
private
struct
ExtensionContext
:
EnvironmentKey
{
static
var
defaultValue
:
NSExtensionContext
?
}
/// The `.extensionContext` of an app extension view controller.
var
extensionContext
:
NSExtensionContext
?
{
get
{
self
[
ExtensionContext
.
self
]
}
set
{
self
[
ExtensionContext
.
self
]
=
newValue
}
}
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Apr 2, 4:29 AM (1 d, 11 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3673043
Attached To
rWFSUI WriteFreely SwiftUI
Event Timeline
Log In to Comment