developer.apple.com pages are rendered with JavaScript, so fetch them as
Markdown instead. For /documentation pages, add .md to the URL
(https://developer.apple.com/documentation/swiftui/view.md). For /design and
/tutorials pages, also insert /tutorials/data before the path
(https://developer.apple.com/tutorials/data/design/human-interface-guidelines/buttons.md).
A few tutorial pages, such as overviews, have no Markdown version; for those,
use .json in place of .md
(https://developer.apple.com/tutorials/data/tutorials/swiftui.json).
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
| // | |
| // ContentView.swift | |
| // Liquid Magnifying Glass | |
| // | |
| // A draggable magnifier loupe with liquid glass effect, zoom controls, and | |
| // full-screen gesture handling for reliable repeated drags. | |
| // | |
| // Created by Ming on 29/1/2026. | |
| // |
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
| # strict: true | |
| # File organization | |
| # included: | |
| # - Sources | |
| # - Tests | |
| excluded: | |
| - .build | |
| - .swiftpm | |
| - DerivedData |
List of all the images in /Library/Developer/CoreSimulator/Volumes/iOS_21A328/Library/Developer/CoreSimulator/Profiles/Runtimes/iOS 17.0.simruntime/Contents/Resources/RuntimeRoot/System/Library/PrivateFrameworks/SFSymbols.framework/CoreGlyphsPrivate.bundle/Assets.car
NSBundle *const sfSymbolsBundle = [SFSCoreGlyphsBundle private];
_UIAssetManager *const assetManager = [_UIAssetManager assetManagerForBundle:sfSymbolsBundle];
UIImage *const image = [assetManager imageNamed:@"apple.breathe"];
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
| disabled_rules: | |
| - trailing_comma | |
| opt_in_rules: | |
| - file_header | |
| file_header: | |
| forbidden_pattern: /./ | |
| custom_rules: | |
| state_private: | |
| name: "Private SwiftUI State" | |
| regex: "\\@State\\s*var" |
See also: UIApplicationDelegate documentation
// AppDelegate.swift
@main
final class AppDelegate: NSObject, UIApplicationDelegate {
func application(
_ application: UIApplication,
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
| // (c) Hannes Oud @hannesoid | |
| /// Hosts a SwiftUI view for use as an`inputAccessoryView` | |
| /// | |
| /// - Implements a subclass of `UIInputViewController`, this allows setting it as `UITextView.inputAccessoryViewController` | |
| /// - Has as a `.view` a `UIView` subclass that provides a `.intrinsicContentSize` which returns the height of a SwiftUI view | |
| /// - Has a `UIHostingViewController` subclass as a child view controller. Invalidates the `.view`'s `intrinsicContentSize` when the SwiftUI view layouts, in order to inform the system to update the size of the `inputAccessoryView` | |
| /// | |
| /// **Usage** | |
| /// |
NewerOlder