mirror of
https://github.com/arichornlover/uYouEnhanced.git
synced 2026-03-11 21:26:04 +00:00
Update uYouPlus.xm
This commit is contained in:
parent
163599f0f6
commit
4867db8002
1 changed files with 28 additions and 0 deletions
|
|
@ -17,6 +17,34 @@ NSBundle *uYouPlusBundle() {
|
|||
NSBundle *tweakBundle = uYouPlusBundle();
|
||||
//
|
||||
|
||||
// activities API
|
||||
@import ActivityKit;
|
||||
|
||||
@interface NoActivityAttributes : NSObject <ActivityAttributes>
|
||||
@end
|
||||
|
||||
@implementation NoActivityAttributes
|
||||
@end
|
||||
|
||||
NoActivityAttributes *attributes = [[NoActivityAttributes alloc] init];
|
||||
Activity<NoActivityAttributes *> *activity = [Activity<ActivityContent<NoActivityAttributes *> > createActivityWithAttributes:attributes];
|
||||
|
||||
[activity startWithContent:[[ActivityContent alloc] init] completion:^(NSError * _Nullable error) {
|
||||
if (error) {
|
||||
NSLog(@"Failed to start Live Activity: %@", error);
|
||||
} else {
|
||||
NSLog(@"Live Activity started successfully");
|
||||
}
|
||||
}];
|
||||
|
||||
[activity endWithCompletion:^(NSError * _Nullable error) {
|
||||
if (error) {
|
||||
NSLog(@"Failed to end Live Activity: %@", error);
|
||||
} else {
|
||||
NSLog(@"Live Activity ended successfully");
|
||||
}
|
||||
}];
|
||||
|
||||
// Notifications Tab appearance
|
||||
UIImage *resizeImage(UIImage *image, CGSize newSize) {
|
||||
UIGraphicsBeginImageContextWithOptions(newSize, NO, 0.0);
|
||||
|
|
|
|||
Loading…
Reference in a new issue