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 | |
struct ContentView: View { | |
@State private var value: Bool = false | |
var body: some View { | |
VStack { | |
EquatableView(content: MyView(value: value)) | |
// MyView(value: value).equatable() | |
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> | |
@interface Error : NSError | |
@end | |
@implementation Error | |
+ (BOOL)occurError:(NSError **)error { | |
*error = [[Error alloc] initWithDomain:NSCocoaErrorDomain code:0 userInfo:nil]; | |
return NO; | |
} | |
- (void)dealloc { |
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 <Virtualization/Virtualization.h> | |
int main(int argc, const char * argv[]) { | |
@autoreleasepool { | |
NSDictionary *dic = @{ | |
@"DataRepresentationVersion": @2, | |
@"MinimumSupportedOS": @[@13, @0, @0], | |
@"PlatformVersion": @4 | |
}; | |
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 MachO | |
import sys_time | |
struct ContentView: View { | |
@State private var timer = Timer.publish(every: 1, on: .main, in: .common).autoconnect() | |
var body: some View { | |
VStack { | |
Image(systemName: "globe") | |
.imageScale(.large) |
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 <objc/message.h> | |
#import <objc/runtime.h> | |
OBJC_EXPORT id objc_msgSendSuper2(void); /* objc_super superInfo = { self, [self class] }; */ | |
@interface MyObject : NSObject { | |
NSUInteger _integer; | |
} | |
@property (assign, nonatomic, setter=custom_setInteger:) NSUInteger integer; |
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> | |
int main(int argc, const char * argv[]) { | |
@autoreleasepool { | |
NSKeyedArchiver *archiver = [[NSKeyedArchiver alloc] initRequiringSecureCoding:YES]; | |
int *integers = malloc(sizeof(int) * 3); | |
integers[0] = 0; | |
integers[1] = 1; | |
integers[2] = 2; | |
[archiver encodeBytes:integers length:sizeof(int) * 3]; |
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); |
NewerOlder