You've already forked hotpocket
BTHLABS-58: Share Extension in Apple Apps
This commit is contained in:
29
services/apple/macOS (App)/ReplaceAnimator.m
Normal file
29
services/apple/macOS (App)/ReplaceAnimator.m
Normal file
@@ -0,0 +1,29 @@
|
||||
//
|
||||
// ReplaceAnimator.m
|
||||
// HotPocket (macOS)
|
||||
//
|
||||
// Created by Tomek Wójcik on 20/09/2025.
|
||||
//
|
||||
|
||||
#import "ReplaceAnimator.h"
|
||||
|
||||
@implementation ReplaceAnimator
|
||||
|
||||
-(void)animatePresentationOfViewController:(NSViewController *)viewController fromViewController:(NSViewController *)fromViewController {
|
||||
NSView *container = fromViewController.view.superview;
|
||||
if (container == nil) {
|
||||
return;
|
||||
}
|
||||
|
||||
[fromViewController.view removeFromSuperview];
|
||||
|
||||
[container addSubview:viewController.view];
|
||||
viewController.view.frame = NSMakeRect(0, 0, viewController.view.frame.size.width, viewController.view.frame.size.height);
|
||||
viewController.view.autoresizingMask = NSViewWidthSizable | NSViewHeightSizable;
|
||||
}
|
||||
|
||||
-(void)animateDismissalOfViewController:(NSViewController *)viewController fromViewController:(NSViewController *)fromViewController {
|
||||
[viewController.view removeFromSuperview];
|
||||
}
|
||||
|
||||
@end
|
||||
Reference in New Issue
Block a user