Post

Replies

Boosts

Views

Activity

Reply to How to make PKInkingTool width constant?
One way I found is to swizzle UITouch force and timestamp methods. #import <objc/runtime.h> @implementation UITouch (UITouch_Overrides) + (void)load { [super load]; static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ [self swizzleForce]; [self swizzleTimestamp]; }); } + (void)swizzleForce { [self swizzle:@selector(force) with:@selector(ed_force)]; } + (void)swizzleTimestamp { [self swizzle:@selector(timestamp) with:@selector(ed_timestamp)]; } + (void)swizzle:(SEL)originalSelector with:(SEL)swizzledSelector {     Class class = [self class];     Method originalMethod = class_getInstanceMethod(class, originalSelector);     Method swizzledMethod = class_getInstanceMethod(class, swizzledSelector);     BOOL didAddMethod =         class_addMethod(class,             originalSelector,             method_getImplementation(swizzledMethod),             method_getTypeEncoding(swizzledMethod));     if (didAddMethod) {         class_replaceMethod(class,             swizzledSelector,             method_getImplementation(originalMethod),             method_getTypeEncoding(originalMethod));     } else {         method_exchangeImplementations(originalMethod, swizzledMethod);     } } - (CGFloat)ed_force { return 1.0; } - (NSTimeInterval)ed_timestamp { return 0; } @end
Topic: App & System Services SubTopic: Core OS Tags:
Sep ’21
Reply to app crashes on macOS BigSur with 'Invalid parameter not satisfying: !isnan(newOrigin.y)'
What helped to me is removing saved Safari windows state. To remove it: Open Terminal app Copy&paste this rm /Users/ivanparfenchuk/Library/Containers/com.apple.Safari/Data/Library/Saved\ Application\ State/com.apple.Safari.savedState/windows.plist and hit Return. This is on macOS Big Sur. If the file isn't there, try to search for windows.plist in other places
Topic: UI Frameworks SubTopic: AppKit Tags:
Sep ’21