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 <Foundation/Foundation.h> | |
#import <UniformTypeIdentifiers/UniformTypeIdentifiers.h> | |
@interface UTType (MyPrivate) | |
+ (void)_enumerateAllDeclaredTypesUsingBlock:(void (^)(UTType *type, BOOL *stop))block; | |
@end | |
UT_EXPORT NSArray<UTType *> *_UTGetAllCoreTypesConstants(void); | |
int main(int argc, const char * argv[]) { |
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
#include <stdio.h> | |
#import <AppKit/AppKit.h> | |
APPKIT_EXTERN size_t _NSParseWithFormat(NSString *, NSString *, ...); | |
int call_vsscanf_l(const char *tokenstring, const char *format, ...) { | |
int result; | |
va_list arglist; | |
va_start(arglist, format); | |
result = vsscanf_l(tokenstring, 0, format, arglist); |
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 <Cocoa/Cocoa.h> | |
#import <objc/runtime.h> | |
int main(int argc, const char * argv[]) { | |
@autoreleasepool { | |
NSSlider *slider = [NSSlider new]; | |
NSView *view = [NSView new]; | |
slider.target = view; | |
slider.action = @selector(description); | |
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
@available(iOS 15.0, *) | |
public struct RichTextEditor : SwiftUICore.View { | |
public init(text: SwiftUICore.Binding<Foundation.AttributedString>) | |
@_Concurrency.MainActor @preconcurrency public var body: some SwiftUICore.View { | |
get | |
} | |
@available(iOS 15.0, *) | |
public typealias Body = @_opaqueReturnTypeOf("$s7SwiftUI14RichTextEditorV4bodyQrvp", 0) __ | |
} | |
@available(*, unavailable) |
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 UIKit | |
import ObjectiveC | |
extension UIApplicationDelegate { | |
var forwardingDelegate: (any UIApplicationDelegate)? { | |
let _TtC7SwiftUI11AppDelegate: AnyClass = objc_lookUpClass("_TtC7SwiftUI11AppDelegate")! | |
guard Self.self == _TtC7SwiftUI11AppDelegate, | |
let fallbackDelegate = Mirror(reflecting: self).descendant("fallbackDelegate")! as? (any UIApplicationDelegate)? | |
else { |
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 | |
@Observable final class ViewModel { | |
var counter = 0 | |
} | |
struct ContentView: View { | |
@State var viewModel: ViewModel = .init() | |
var body: 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
import SwiftUI | |
@main | |
struct MyApp: App { | |
var body: some Scene { | |
WindowGroup { | |
ContentView() | |
} | |
} | |
} |
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 | |
@main | |
struct MyApp: App { | |
var body: some Scene { | |
WindowGroup { | |
ContentView() | |
} | |
} | |
} |
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 ObjectiveC | |
struct ColorPicker: UIViewControllerRepresentable { | |
private enum DidChangeColor { | |
case block(UIColor?, (_ color: UIColor, _ continuously: Bool) -> Void) | |
case binding(Binding<UIColor>, Bool) | |
var didSelectColorHandler: (UIColor, Bool) -> Void { | |
{ color, continuously 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 UIKit | |
struct SearchBookSummaryContentConfiguration: UIContentConfiguration { | |
fileprivate let searchItem: any SearchItem | |
init(searchItem: any SearchItem) { | |
self.searchItem = searchItem | |
} | |
func makeContentView() -> any UIView & UIContentView { |