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 CompactSlider | |
| @main | |
| struct IntelligenceDemoApp: App { | |
| @NSApplicationDelegateAdaptor var appDelegate: AppDelegate | |
| var body: some Scene { | |
| _EmptyScene() |
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
| echo Output defaults domains | |
| defaults domains > domains.txt | |
| echo Replace \', \' with new lines | |
| sed -i "" 's/, /\n/g' domains.txt | |
| echo Reset Liquid Glass defaults for apps | |
| while read d; do | |
| defaults delete "$d" com.apple.SwiftUI.IgnoreSolariumLinkedOnCheck | |
| done <domains.txt |
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
| public struct StaggerTextEffect: ATTextAnimateEffect { | |
| public var data: ATElementData | |
| public var userInfo: Any? | |
| public init(_ data: ATElementData, _ userInfo: Any?) { | |
| self.data = data | |
| self.userInfo = userInfo | |
| } | |
| public func body(content: Content) -> some View { |
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
| let windowStyles: NSWindow.StyleMask = [.titled, .utilityWindow, .hudWindow] | |
| let windowRect = NSRect.init(x: 0, y: 0, width: 600, height: 400) | |
| let window = NSPanel.init(contentRect: windowRect, styleMask: windowStyles, backing: .buffered, defer: true) | |
| window.title = "Title" | |
| window.titleVisibility = .hidden | |
| window.titlebarAppearsTransparent = true | |
| let view = NSView() | |
| window.contentView = view | |
| window.contentView?.wantsLayer = true | |
| window.contentView?.layer?.cornerRadius = 0.0 |
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 | |
| extension View { | |
| /// Allows swipe back when navigation bar is hidden. | |
| /// This modifier should be applied to a view that resides within a NavigationStack. | |
| /// - Returns: A view that allows swipe back when navigation bar is hidden. | |
| public func allowsSwipeBackWhenNavBarHidden() -> some View { | |
| modifier( AllowsSwipeBackWhenNavBarHiddenModifier() ) | |
| } | |
| } |
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
| let label = UILabel() | |
| label.text = "Swift is a modern, intuitive programming language crafted for all Apple platforms." | |
| label.setValue(true, forKey: "marqueeEnabled") | |
| label.setValue(true, forKey: "marqueeRunning") | |
| label.setValue(0, forKey: "marqueeRepeatCount") |
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
| // | |
| // VariableBlurView.swift | |
| // MFileViewer | |
| // | |
| // Created by yuki on 2025/04/21. | |
| // | |
| import SwiftUI | |
| import UIKit | |
| import CoreImage |
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
| // Example | |
| // Custom extension to add a blur effect style with raw value 1100 | |
| extension UIBlurEffect.Style { | |
| static var systemChromeBackground: UIBlurEffect.Style { | |
| return UIBlurEffect.Style(rawValue: 1100) ?? .dark | |
| } | |
| } |
NewerOlder