This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import AVFoundation | |
import SpriteKit | |
import SwiftUI | |
@MainActor | |
class TransparentBackgroundVideoPlayerUIView: SKView { | |
let backgroundNode: SKSpriteNode | |
let videoPlayer: AVPlayer | |
let videoNode: SKVideoNode | |
let url: URL |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct ContentView: View { | |
var body: some View { | |
let names = [ | |
["appstore.app.dashed", "buildings.3d", "emoji.chicken.face"], | |
["person.text.rectangle.and.nfc", "secure.element", "laugh.bubble.tapback.2.he"], | |
["apple.news", "apple.podcasts.square.stack", "apple.slice"], | |
] | |
VStack(spacing: 20) { | |
Grid(horizontalSpacing: 20, verticalSpacing: 20) { | |
ForEach(names, id: \.self) { nameRow in |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
import PlaygroundSupport | |
struct InspectorSidebarToolbarTop: View { | |
@State var targeted: Bool = true | |
@State private var icons = [ | |
InspectorDockIcon(imageName: "doc", title: "File Inspector", id: 0), | |
InspectorDockIcon(imageName: "clock", title: "History Inspector", id: 1), | |
InspectorDockIcon(imageName: "questionmark.circle", title: "Quick Help Inspector", id: 2) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remember: import UserNotifications | |
func sendNotification(title: String, body: String = "") { | |
let content = UNMutableNotificationContent() | |
content.title = title | |
if body.count > 0 { | |
content.body = body | |
} | |